summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-26 16:18:08 +0100
committerErik Johnston <erik@matrix.org>2017-04-26 16:18:08 +0100
commit34e682d3855562a4ca6e32f366a2ecfa1c684a3a (patch)
tree6328201b5fb85cf4986cbb10066e6e7497d82bbc /synapse/handlers
parentMerge pull request #2160 from matrix-org/erikj/reduce_join_cache_size (diff)
downloadsynapse-34e682d3855562a4ca6e32f366a2ecfa1c684a3a.tar.xz
Fix invite state to always include all events
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/message.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 348056add5..82a2ade1f6 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -531,9 +531,9 @@ class MessageHandler(BaseHandler):
 
                 state_to_include_ids = [
                     e_id
-                    for k, e_id in context.current_state_ids.items()
+                    for k, e_id in context.current_state_ids.iteritems()
                     if k[0] in self.hs.config.room_invite_state_types
-                    or k[0] == EventTypes.Member and k[1] == event.sender
+                    or k == (EventTypes.Member, event.sender)
                 ]
 
                 state_to_include = yield self.store.get_events(state_to_include_ids)
@@ -545,7 +545,7 @@ class MessageHandler(BaseHandler):
                         "content": e.content,
                         "sender": e.sender,
                     }
-                    for e in state_to_include.values()
+                    for e in state_to_include.itervalues()
                 ]
 
                 invitee = UserID.from_string(event.state_key)
@@ -618,6 +618,3 @@ class MessageHandler(BaseHandler):
             )
 
         preserve_fn(_notify)()
-
-        # If invite, remove room_state from unsigned before sending.
-        event.unsigned.pop("invite_room_state", None)