unhardcode m.room.avatar

This commit is contained in:
Matthew Hodgson 2018-09-18 14:12:47 +01:00
parent c7131baefc
commit a85e2625cd

View file

@ -314,7 +314,7 @@ class RoomListHandler(BaseHandler):
EventTypes.CanonicalAlias,
EventTypes.RoomHistoryVisibility,
EventTypes.GuestAccess,
"m.room.avatar",
EventTypes.RoomAvatar,
)
])
@ -367,7 +367,7 @@ class RoomListHandler(BaseHandler):
guest = guest_event.content.get("guest_access", None)
result["guest_can_join"] = guest == "can_join"
avatar_event = current_state.get(("m.room.avatar", ""))
avatar_event = current_state.get((EventTypes.RoomAvatar, ""))
if avatar_event:
avatar_url = avatar_event.content.get("url", None)
if avatar_url: