0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 19:53:51 +01:00

Precent lack of presence visiblity from causing room /members/list to fail

This commit is contained in:
Paul "LeoNerd" Evans 2014-08-18 13:17:35 +01:00
parent f65176564f
commit 7d324612ec

View file

@ -350,10 +350,14 @@ class RoomMemberListRestServlet(RestServlet):
for event in members["chunk"]: for event in members["chunk"]:
target_user = self.hs.parse_userid(event["target_user_id"]) target_user = self.hs.parse_userid(event["target_user_id"])
# Presence is an optional cache; don't fail if we can't fetch it
try:
presence_state = yield self.handlers.presence_handler.get_state( presence_state = yield self.handlers.presence_handler.get_state(
target_user=target_user, auth_user=user target_user=target_user, auth_user=user
) )
event["content"].update(presence_state) event["content"].update(presence_state)
except:
pass
defer.returnValue((200, members)) defer.returnValue((200, members))