mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
More join conditions
This commit is contained in:
parent
6ead27ddda
commit
61d05daab1
@ -154,7 +154,9 @@ class RoomMemberStore(SQLBaseStore):
|
||||
"SELECT m.room_id, m.sender, m.membership"
|
||||
" FROM room_memberships as m"
|
||||
" INNER JOIN current_state_events as c"
|
||||
" ON m.event_id = c.event_id"
|
||||
" ON m.event_id = c.event_id "
|
||||
" AND m.room_id = c.room_id "
|
||||
" AND m.user_id = c.state_key"
|
||||
" WHERE %s"
|
||||
) % (where_clause,)
|
||||
|
||||
@ -212,7 +214,9 @@ class RoomMemberStore(SQLBaseStore):
|
||||
sql = (
|
||||
"SELECT m.* FROM room_memberships as m"
|
||||
" INNER JOIN current_state_events as c"
|
||||
" ON m.event_id = c.event_id AND m.room_id = c.room_id "
|
||||
" ON m.event_id = c.event_id "
|
||||
" AND m.room_id = c.room_id "
|
||||
" AND m.user_id = c.state_key"
|
||||
" WHERE %(where)s"
|
||||
) % {
|
||||
"where": where_clause,
|
||||
|
Loading…
Reference in New Issue
Block a user