Skip to content
This repository was archived by the owner on Jan 20, 2020. It is now read-only.

on_message Event handler uses "message" instead of "event" #23

@jyapayne

Description

@jyapayne

In the code below in events.py, I believe the line self.message_handler(message) should be changed to self.message_handler(event) because in my handler, I currently have to call json.loads() manually on the message.

...
    def _on_message(self, ws, message):
        logger.info("Websocket Message: %s" % message)
        try:
            event = json.loads(message)
        except ValueError:
            return
        if event.get("type") == "auth":
            return

        if self.message_handler:
            self.message_handler(message)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions