Allow blocking a room multiple times

pull/4904/head
Erik Johnston 2019-03-20 16:50:05 +00:00
parent 4d53017432
commit 67d618e111
1 changed files with 4 additions and 2 deletions

View File

@ -500,10 +500,12 @@ class RoomStore(RoomWorkerStore, SearchStore):
@defer.inlineCallbacks
def block_room(self, room_id, user_id):
yield self._simple_insert(
yield self._simple_upsert(
table="blocked_rooms",
values={
keyvalues={
"room_id": room_id,
},
insertion_values={
"user_id": user_id,
},
desc="block_room",