mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-11 09:39:30 -05:00
Prevent crash on user who doesn't have any direct rooms
This commit is contained in:
parent
1f18c7cfc9
commit
887ca93a1b
@ -266,7 +266,7 @@ class RoomCreationHandler(BaseHandler):
|
|||||||
user_id,
|
user_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
if user_account_data:
|
if user_account_data and "m.direct" in user_account_data[0]:
|
||||||
direct_rooms = user_account_data[0]["m.direct"]
|
direct_rooms = user_account_data[0]["m.direct"]
|
||||||
# Check if this room was a DM
|
# Check if this room was a DM
|
||||||
if old_room_id in direct_rooms[user_id]:
|
if old_room_id in direct_rooms[user_id]:
|
||||||
|
Loading…
Reference in New Issue
Block a user