summary refs log tree commit diff
path: root/synapse/storage/data_stores/main/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-05-26 09:43:21 +0100
committerErik Johnston <erik@matrix.org>2020-05-26 09:43:21 +0100
commit8beca8e21f16e36b94fc79ff31702bb57e4a2f17 (patch)
treec837d22a8a02dc71581aa1207ecd19b95625b4bf /synapse/storage/data_stores/main/roommember.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentSimplify reap_monthly_active_users (#7558) (diff)
downloadsynapse-8beca8e21f16e36b94fc79ff31702bb57e4a2f17.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage/data_stores/main/roommember.py')
-rw-r--r--synapse/storage/data_stores/main/roommember.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/synapse/storage/data_stores/main/roommember.py b/synapse/storage/data_stores/main/roommember.py

index 1e9c850152..137ebac833 100644 --- a/synapse/storage/data_stores/main/roommember.py +++ b/synapse/storage/data_stores/main/roommember.py
@@ -1046,29 +1046,6 @@ class RoomMemberStore(RoomMemberWorkerStore, RoomMemberBackgroundUpdateStore): def __init__(self, database: Database, db_conn, hs): super(RoomMemberStore, self).__init__(database, db_conn, hs) - @defer.inlineCallbacks - def locally_reject_invite(self, user_id, room_id): - sql = ( - "UPDATE local_invites SET stream_id = ?, locally_rejected = ? WHERE" - " room_id = ? AND invitee = ? AND locally_rejected is NULL" - " AND replaced_by is NULL" - ) - - def f(txn, stream_ordering): - txn.execute(sql, (stream_ordering, True, room_id, user_id)) - - # We also clear this entry from `local_current_membership`. - # Ideally we'd point to a leave event, but we don't have one, so - # nevermind. - self.db.simple_delete_txn( - txn, - table="local_current_membership", - keyvalues={"room_id": room_id, "user_id": user_id}, - ) - - with self._stream_id_gen.get_next() as stream_ordering: - yield self.db.runInteraction("locally_reject_invite", f, stream_ordering) - def forget(self, user_id, room_id): """Indicate that user_id wishes to discard history for room_id."""