diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-06 14:45:57 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-06 14:45:57 +0000 |
commit | 8a12df8cf3bc4c4c38be9f098b85e61e2e9bb82b (patch) | |
tree | 4e9e7fffb4a28a4d5b8dc3eddcd0a65cfe0672b5 /synapse/handlers/profile.py | |
parent | SYN-32 Use the ANTIALIAS resize method for thumbnailing images (diff) | |
parent | Name 'user_rooms_intersect' transaction (diff) | |
download | synapse-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.py | 10 |
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) |