mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-27 20:52:30 +00:00
Merge pull request #354 from matrix-org/markjh/SYN-513
SYN-513: Include updates for rooms that have had all their tags deleted
This commit is contained in:
commit
b1953a9627
@ -272,7 +272,7 @@ class SyncHandler(BaseHandler):
|
|||||||
def private_user_data_for_room(self, room_id, tags_by_room):
|
def private_user_data_for_room(self, room_id, tags_by_room):
|
||||||
private_user_data = []
|
private_user_data = []
|
||||||
tags = tags_by_room.get(room_id)
|
tags = tags_by_room.get(room_id)
|
||||||
if tags:
|
if tags is not None:
|
||||||
private_user_data.append({
|
private_user_data.append({
|
||||||
"type": "m.tag",
|
"type": "m.tag",
|
||||||
"content": {"tags": tags},
|
"content": {"tags": tags},
|
||||||
|
@ -95,8 +95,7 @@ class TagsStore(SQLBaseStore):
|
|||||||
if room_ids:
|
if room_ids:
|
||||||
tags_by_room = yield self.get_tags_for_user(user_id)
|
tags_by_room = yield self.get_tags_for_user(user_id)
|
||||||
for room_id in room_ids:
|
for room_id in room_ids:
|
||||||
if room_id in tags_by_room:
|
results[room_id] = tags_by_room.get(room_id, {})
|
||||||
results[room_id] = tags_by_room[room_id]
|
|
||||||
|
|
||||||
defer.returnValue(results)
|
defer.returnValue(results)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user