summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-02 11:15:43 +0100
committerErik Johnston <erik@matrix.org>2015-10-02 11:15:43 +0100
commita086b7aa003a53562f00dda9e655a6a48f39b259 (patch)
tree465ef56e76ea054e48e57bec0abddeae08a94fd7 /synapse/handlers/message.py
parentMerge pull request #279 from matrix-org/erikj/unfederatable (diff)
parentAlso bundle in sender (diff)
downloadsynapse-a086b7aa003a53562f00dda9e655a6a48f39b259.tar.xz
Merge pull request #275 from matrix-org/erikj/invite_state
Bundle in some room state in invites.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index bda8eb5f3f..30949ff7a6 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -383,8 +383,12 @@ class MessageHandler(BaseHandler):
             }
 
             if event.membership == Membership.INVITE:
+                time_now = self.clock.time_msec()
                 d["inviter"] = event.sender
 
+                invite_event = yield self.store.get_event(event.event_id)
+                d["invite"] = serialize_event(invite_event, time_now, as_client_event)
+
             rooms_ret.append(d)
 
             if event.membership not in (Membership.JOIN, Membership.LEAVE):