Skip to content
Snippets Groups Projects
Unverified Commit e1544b0a authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #6493 from matrix-org/erikj/invite_state_config

Pull out room_invite_state_types config option once.
parents 18660a34 4a161a29
No related branches found
No related tags found
No related merge requests found
Fix small performance regression for sending invites.
......@@ -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)
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment