diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-10-29 06:46:00 +0000 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-10-29 06:46:00 +0000 |
commit | 0ee8d1b64149205de65e3f81ecc8bd38fc71ae95 (patch) | |
tree | ecf06d475590f3267f2e5a470a0fb4281be911dd /synapse/storage | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/create_sup... (diff) | |
download | synapse-0ee8d1b64149205de65e3f81ecc8bd38fc71ae95.tar.xz |
wip tests to filter out support user
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/user_directory.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py index 5699cea855..cd25e07719 100644 --- a/synapse/storage/user_directory.py +++ b/synapse/storage/user_directory.py @@ -339,7 +339,7 @@ class UserDirectoryStore(SQLBaseStore): rows = yield self._execute("get_all_local_users", None, sql) defer.returnValue([name for name, in rows]) - def add_users_who_share_room(self, room_id, share_private, user_id_tuples): + def add_users_who_share_room(self, room_id, share_private, user_id_tuples_x): """Insert entries into the users_who_share_rooms table. The first user should be a local user. @@ -350,9 +350,7 @@ class UserDirectoryStore(SQLBaseStore): """ def _add_users_who_share_room_txn(txn): support_user = self.hs.config.support_user_id - for ut in user_id_tuples: - if support_user in ut: - user_id_tuples.remove(ut) + user_id_tuples = filter(lambda x: support_user not in x, user_id_tuples_x) self._simple_insert_many_txn( txn, |