mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Update room column when room becomes unpublic
This commit is contained in:
parent
168524543f
commit
b5db4ed5f6
2 changed files with 31 additions and 2 deletions
|
@ -79,6 +79,16 @@ class UserDirectoryStore(SQLBaseStore):
|
|||
"add_profiles_to_user_dir", _add_profiles_to_user_dir_txn
|
||||
)
|
||||
|
||||
@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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue