diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-16 11:51:46 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-16 11:54:26 +0000 |
commit | 6957bfdca6658114526033e839ceec38b988a323 (patch) | |
tree | ca9d3fab0eca8945466f37d1d26991cff991ba02 /synapse/handlers/profile.py | |
parent | Implement no op for room stream in sync (diff) | |
download | synapse-6957bfdca6658114526033e839ceec38b988a323.tar.xz |
Don't recreate so many sets
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r-- | synapse/handlers/profile.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 87f74dfb8e..abd1fb28cb 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -156,11 +156,11 @@ class ProfileHandler(BaseHandler): self.ratelimit(requester) - joins = yield self.store.get_rooms_for_user( + room_ids = yield self.store.get_rooms_for_user( user.to_string(), ) - for j in joins: + for room_id in room_ids: handler = self.hs.get_handlers().room_member_handler try: # Assume the user isn't a guest because we don't let guests set @@ -171,12 +171,12 @@ class ProfileHandler(BaseHandler): yield handler.update_membership( requester, user, - j.room_id, + room_id, "join", # We treat a profile update like a join. ratelimit=False, # Try to hide that these events aren't atomic. ) except Exception as e: logger.warn( "Failed to update join event for room %s - %s", - j.room_id, str(e.message) + room_id, str(e.message) ) |