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

Use get_current_users_in_room from store and not StateHandler #9910

Merged
merged 8 commits into from
May 5, 2021
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/9910.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve performance after joining a large room when presence is enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.feature?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are performance improvements features? They're not new buttons per se.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the line is obviously fuzzy, but to me the question is whether it is interesting to Synapse admins/users - in which case, it's a .feature - or just developers, in which case it's a .misc.

2 changes: 1 addition & 1 deletion synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ async def _on_user_joined_room(

remote_host = get_domain_from_id(user_id)

users = await self.state.get_current_users_in_room(room_id)
users = await self.store.get_users_in_room(room_id)
user_ids = list(filter(self.is_mine_id, users))

states_d = await self.current_state_for_users(user_ids)
Expand Down