diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index cc9e62360..8dc8f5c64 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -323,11 +323,6 @@ class StreamStore(SQLBaseStore): " WHERE m.user_id = ? AND m.membership = 'join'" ) current_room_membership_args = [user_id] - if room_ids: - current_room_membership_sql += " AND m.room_id in (%s)" % ( - ",".join(map(lambda _: "?", room_ids)) - ) - current_room_membership_args = [user_id] + room_ids # We also want to get any membership events about that user, e.g. # invites or leave notifications.