mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 09:04:11 -04:00
Don't include appservice users when calculating push rules (#13332)
This can cause a lot of extra load on servers with lots of appservice users. Introduced in #13078
This commit is contained in:
parent
6fccd72f42
commit
b4ae3b0d44
3 changed files with 93 additions and 0 deletions
|
@ -131,6 +131,13 @@ class BulkPushRuleEvaluator:
|
|||
|
||||
local_users = await self.store.get_local_users_in_room(event.room_id)
|
||||
|
||||
# Filter out appservice users.
|
||||
local_users = [
|
||||
u
|
||||
for u in local_users
|
||||
if not self.store.get_if_app_services_interested_in_user(u)
|
||||
]
|
||||
|
||||
# if this event is an invite event, we may need to run rules for the user
|
||||
# who's been invited, otherwise they won't get told they've been invited
|
||||
if event.type == EventTypes.Member and event.membership == Membership.INVITE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue