diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-31 13:30:12 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-31 13:40:28 +0100 |
commit | b5db4ed5f68ee81557393e94436d768b955b1aa0 (patch) | |
tree | 92465337ea1d72b1c81ae66f54f6126cb8b7a056 /synapse/storage | |
parent | Add call later (diff) | |
download | synapse-b5db4ed5f68ee81557393e94436d768b955b1aa0.tar.xz |
Update room column when room becomes unpublic
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/user_directory.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py index 6c7c8c4bee..d72b93b585 100644 --- a/synapse/storage/user_directory.py +++ b/synapse/storage/user_directory.py @@ -80,6 +80,16 @@ class UserDirectoryStore(SQLBaseStore): ) @defer.inlineCallbacks + def update_user_in_user_dir(self, user_id, room_id): + yield self._simple_update_one( + table="user_directory", + keyvalues={"user_id": user_id}, + updatevalues={"room_id": room_id}, + desc="update_user_in_user_dir", + ) + self.get_user_in_directory.invalidate((user_id,)) + + @defer.inlineCallbacks def remove_from_user_dir(self, user_id): yield self._simple_delete( table="user_directory", |