Skip to content

Commit

Permalink
Handle chathistory events
Browse files Browse the repository at this point in the history
  • Loading branch information
erdnaxe committed Oct 8, 2022
1 parent fb0d5b2 commit 2bef3bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion galene_stream/galene.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,13 @@ async def loop(self, event_loop) -> None:
elif message["type"] == "close":
continue # ignore close events
elif message["type"] == "chat":
# User might request statistics
# User might request statistics using `!webrtc` chat command
if message.get("value") == "!webrtc":
m = self.webrtc.get_stats()
if m:
await self.send_chat(m)
elif message["type"] == "chathistory":
continue # ignore chat history events
else:
# Oh no! We receive something not implemented
log.warn(f"Not implemented {message}")

0 comments on commit 2bef3bf

Please sign in to comment.