mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Don't expect all _user_cachemap entries to definitely contain a "last_active" key
This commit is contained in:
parent
17f977a9de
commit
4c18e08036
@ -180,9 +180,9 @@ class PresenceHandler(BaseHandler):
|
|||||||
state["presence"] = state.pop("state")
|
state["presence"] = state.pop("state")
|
||||||
|
|
||||||
if target_user in self._user_cachemap:
|
if target_user in self._user_cachemap:
|
||||||
state["last_active"] = (
|
cached_state = self._user_cachemap[target_user].get_state()
|
||||||
self._user_cachemap[target_user].get_state()["last_active"]
|
if "last_active" in cached_state:
|
||||||
)
|
state["last_active"] = cached_state["last_active"]
|
||||||
else:
|
else:
|
||||||
# TODO(paul): Have remote server send us permissions set
|
# TODO(paul): Have remote server send us permissions set
|
||||||
state = self._get_or_offline_usercache(target_user).get_state()
|
state = self._get_or_offline_usercache(target_user).get_state()
|
||||||
|
Loading…
Reference in New Issue
Block a user