Skip to content
Snippets Groups Projects
Commit 4c18e080 authored by Paul "LeoNerd" Evans's avatar Paul "LeoNerd" Evans
Browse files

Don't expect all _user_cachemap entries to definitely contain a "last_active" key

parent 17f977a9
No related branches found
No related tags found
No related merge requests found
......@@ -180,9 +180,9 @@ class PresenceHandler(BaseHandler):
state["presence"] = state.pop("state")
if target_user in self._user_cachemap:
state["last_active"] = (
self._user_cachemap[target_user].get_state()["last_active"]
)
cached_state = self._user_cachemap[target_user].get_state()
if "last_active" in cached_state:
state["last_active"] = cached_state["last_active"]
else:
# TODO(paul): Have remote server send us permissions set
state = self._get_or_offline_usercache(target_user).get_state()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment