Allow blocking a room multiple times

This commit is contained in:
Erik Johnston 2019-03-20 16:50:05 +00:00
parent 4d53017432
commit 67d618e111

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",