summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-06 14:37:00 +0000
committerErik Johnston <erik@matrix.org>2015-01-06 14:37:00 +0000
commit76ec154e95518fe91d430c76303feadf6c76dabc (patch)
tree1e9a7445da9a1e7dd657b06ba79bb6ff02794e8e /synapse/handlers/profile.py
parentPEP8 (diff)
downloadsynapse-76ec154e95518fe91d430c76303feadf6c76dabc.tar.xz
We don't need the full events for get_rooms_for_user_where_membership_is
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index 3f11e2dcf4..8d4d44150d 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -16,7 +16,7 @@
 from twisted.internet import defer
 
 from synapse.api.errors import SynapseError, AuthError, CodeMessageException
-from synapse.api.constants import Membership
+from synapse.api.constants import EventTypes, Membership
 from synapse.util.logcontext import PreserveLoggingContext
 
 from ._base import BaseHandler
@@ -203,7 +203,7 @@ class ProfileHandler(BaseHandler):
 
         for j in joins:
             content = {
-                "membership": j.content["membership"],
+                "membership": Membership.JOIN,
             }
 
             yield self.distributor.fire(
@@ -212,9 +212,9 @@ class ProfileHandler(BaseHandler):
 
             msg_handler = self.hs.get_handlers().message_handler
             yield msg_handler.create_and_send_event({
-                "type": j.type,
+                "type": EventTypes.Member,
                 "room_id": j.room_id,
-                "state_key": j.state_key,
+                "state_key": user.to_string(),
                 "content": content,
-                "sender": j.state_key
+                "sender": user.to_string()
             }, ratelimit=False)