Proper join

This commit is contained in:
Erik Johnston 2024-08-29 16:14:50 +01:00
parent 86a0730f73
commit c038ff9e24

View file

@ -1407,7 +1407,7 @@ class RoomMemberWorkerStore(EventsWorkerStore, CacheInvalidationWorkerStore):
COALESCE(j.tombstone_successor_room_id, m.tombstone_successor_room_id) COALESCE(j.tombstone_successor_room_id, m.tombstone_successor_room_id)
FROM sliding_sync_membership_snapshots AS m FROM sliding_sync_membership_snapshots AS m
INNER JOIN rooms AS r USING (room_id) INNER JOIN rooms AS r USING (room_id)
LEFT JOIN sliding_sync_joined_rooms AS j USING (room_id) LEFT JOIN sliding_sync_joined_rooms AS j ON (j.room_id = m.room_id AND m.membership = 'join')
WHERE user_id = ? WHERE user_id = ?
AND m.forgotten = 0 AND m.forgotten = 0
""" """