Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

JSON decode websocket events & allow usage of own loop#125

Open
jorants wants to merge 1 commit into
Vaelor:masterfrom
jorants:master
Open

JSON decode websocket events & allow usage of own loop#125
jorants wants to merge 1 commit into
Vaelor:masterfrom
jorants:master

Conversation

@jorants

@jorants jorants commented Jan 19, 2023

Copy link
Copy Markdown

This pull request adds two small changes to the websocket interface:

  1. Events are decoded before being send, and only events are send to the eventhandler, not other messages. It might be needed to further decode this message in case of a 'posted' event. See JSON encoded string inside JSON string for 'posted' websockets events mattermost/mattermost#22110 Do we want to add that?
  2. The websocket asyncio loop can now be specified for init_websocket. There is also a new run_websocket async function that can be used in case you need to run other tasks in the loop as well. For example, I needed my bot to check a RSS feed for updated, but also wanted to listen to the websocket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant