Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1878,15 +1878,11 @@ async def _classify_rooms_by_membership_changes(
# 2. Should we add this to `newly_left_rooms`?
# Check if we have left the room. This can either be because we were
# joined before *or* that we since joined and then left.
if events[-1].membership != Membership.JOIN:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has the same problem as bca64f9.

if has_join:
if has_join:
newly_left_rooms.append(room_id)
else:
if old_mem_ev is not None and old_mem_ev.membership == Membership.JOIN:
newly_left_rooms.append(room_id)
else:
if (
old_mem_ev is not None
and old_mem_ev.membership == Membership.JOIN
):
newly_left_rooms.append(room_id)

# 3. Should we add this room to `invited`?
# Only bother if we're still currently invited
Expand Down