get_users_who_share_room_with_user(...)
should use the users_who_share_private_rooms
/users_in_public_rooms
tables instead of calculating it themselves again (get_users_in_room
mis-use)
#13967
Labels
This issue has been migrated from #13967.
get_users_who_share_room_with_user(...)
should use theusers_who_share_private_rooms
/users_in_public_rooms
tables instead of calculating it themselves again.This might be a nice optimization for the presence and device list sharing code where
get_users_who_share_room_with_user
is used.https://github.com/matrix-org/synapse/blob/6f0c3e669da458e838e7b4b165a13e8a5312d6d0/synapse/storage/databases/main/roommember.py#L768-L777
Discovered while working on matrix-org/synapse#13958 and seeing code for users sharing rooms in matrix-org/synapse#13966
See matrix-org/synapse#13575 (comment) for the original exploration around finding
get_users_in_room
mis-uses.The text was updated successfully, but these errors were encountered: