Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix presence bug introduced in 1.64 by #13313 #14243

Merged
merged 4 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
1 change: 1 addition & 0 deletions changelog.d/14243.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.64.0 regarding presence updates in sync.
DMRobertson marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 1 addition & 2 deletions synapse/storage/databases/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def do_users_share_a_room_txn(
# user and the set of other users, and then checking if there is any
# overlap.
sql = f"""
SELECT b.state_key
SELECT DISTINCT b.state_key
FROM (
SELECT room_id FROM current_state_events
WHERE type = 'm.room.member' AND membership = 'join' AND state_key = ?
Expand All @@ -751,7 +751,6 @@ def do_users_share_a_room_txn(
SELECT room_id, state_key FROM current_state_events
WHERE type = 'm.room.member' AND membership = 'join' AND {clause}
) AS b using (room_id)
LIMIT 1
MatMaul marked this conversation as resolved.
Show resolved Hide resolved
"""

txn.execute(sql, (user_id, *args))
Expand Down