diff options
author | Erik Johnston <erikj@jki.re> | 2017-06-13 12:48:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 12:48:50 +0100 |
commit | 6c6b9689bb7397f68ce77813e75f147b331484c1 (patch) | |
tree | 390b96a80c8481f6d860d32009ab9ac9c1ae08c5 /synapse/handlers | |
parent | Merge pull request #2278 from matrix-org/erikj/fix_user_dir (diff) | |
parent | Fix user directory insertion due to missing room_id (diff) | |
download | synapse-6c6b9689bb7397f68ce77813e75f147b331484c1.tar.xz |
Merge pull request #2279 from matrix-org/erikj/fix_user_dir
Fix user directory insertion due to missing room_id
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/user_directory.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py index ce5a506b74..f4451e5dfb 100644 --- a/synapse/handlers/user_directory.py +++ b/synapse/handlers/user_directory.py @@ -203,7 +203,9 @@ class UserDirectoyHandler(object): if change is None: # Handle any profile changes - yield self._handle_profile_change(state_key, prev_event_id, event_id) + yield self._handle_profile_change( + state_key, room_id, prev_event_id, event_id, + ) continue if not change: @@ -372,7 +374,7 @@ class UserDirectoyHandler(object): yield self.store.remove_from_user_in_public_room(user_id) @defer.inlineCallbacks - def _handle_profile_change(self, user_id, prev_event_id, event_id): + def _handle_profile_change(self, user_id, room_id, prev_event_id, event_id): """Check member event changes for any profile changes and update the database if there are. """ @@ -395,7 +397,9 @@ class UserDirectoyHandler(object): new_avatar = event.content.get("avatar_url") if prev_name != new_name or prev_avatar != new_avatar: - yield self.store.update_profile_in_user_dir(user_id, new_name, new_avatar) + yield self.store.update_profile_in_user_dir( + user_id, new_name, new_avatar, room_id, + ) @defer.inlineCallbacks def _get_key_change(self, prev_event_id, event_id, key_name, public_value): |