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:45:57 +0000
committerErik Johnston <erik@matrix.org>2015-01-06 14:45:57 +0000
commit8a12df8cf3bc4c4c38be9f098b85e61e2e9bb82b (patch)
tree4e9e7fffb4a28a4d5b8dc3eddcd0a65cfe0672b5 /synapse/handlers/profile.py
parentSYN-32 Use the ANTIALIAS resize method for thumbnailing images (diff)
parentName 'user_rooms_intersect' transaction (diff)
downloadsynapse-8a12df8cf3bc4c4c38be9f098b85e61e2e9bb82b.tar.xz
Merge branch 'erikj-perf' of github.com:matrix-org/synapse into develop
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 601e0b4642..7777d3cc94 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)