diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-09 12:23:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 12:23:21 +0000 |
commit | e1544b0af87e6525f4671c8c89827fb6a23c7858 (patch) | |
tree | 952371e59d01747603dc7cc939a1cabadffa32b8 | |
parent | Fix inaccurate per-block metrics (#6491) (diff) | |
parent | Newsfile (diff) | |
download | synapse-e1544b0af87e6525f4671c8c89827fb6a23c7858.tar.xz |
Merge pull request #6493 from matrix-org/erikj/invite_state_config
Pull out room_invite_state_types config option once.
-rw-r--r-- | changelog.d/6493.bugfix | 1 | ||||
-rw-r--r-- | synapse/handlers/message.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/6493.bugfix b/changelog.d/6493.bugfix new file mode 100644 index 0000000000..440c02efbe --- /dev/null +++ b/changelog.d/6493.bugfix @@ -0,0 +1 @@ +Fix small performance regression for sending invites. diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 4f53a5f5dc..54fa216d83 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -363,6 +363,8 @@ class EventCreationHandler(object): self.config = hs.config self.require_membership_for_aliases = hs.config.require_membership_for_aliases + self.room_invite_state_types = self.hs.config.room_invite_state_types + self.send_event_to_master = ReplicationSendEventRestServlet.make_client(hs) # This is only used to get at ratelimit function, and maybe_kick_guest_users @@ -916,7 +918,7 @@ class EventCreationHandler(object): state_to_include_ids = [ e_id for k, e_id in iteritems(current_state_ids) - if k[0] in self.hs.config.room_invite_state_types + if k[0] in self.room_invite_state_types or k == (EventTypes.Member, event.sender) ] |