Skip to content

Commit

Permalink
refactor: ♻️ Exclude no bots leave events
Browse files Browse the repository at this point in the history
  • Loading branch information
egalvis39 committed Dec 1, 2023
1 parent 299e863 commit 576f536
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion menuflow/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ async def handle_join(self, evt: StrippedStateEvent):
await self.algorithm(room=room)

async def handle_leave(self, evt: StrippedStateEvent):
room = await Room.get_by_room_id(room_id=evt.room_id, create=False)
if evt.state_key == self.mxid:
return

room = await Room.get_by_room_id(room_id=evt.room_id, create=False)
if not room:
return

Expand Down

0 comments on commit 576f536

Please sign in to comment.