mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 12:14:58 -05:00
More helpful variable names
This commit is contained in:
parent
776ee6d92b
commit
83eb627b5a
@ -268,10 +268,10 @@ class PresenceHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if check_auth:
|
if check_auth:
|
||||||
for u in local_users:
|
for user in local_users:
|
||||||
visible = yield self.is_presence_visible(
|
visible = yield self.is_presence_visible(
|
||||||
observer_user=auth_user,
|
observer_user=auth_user,
|
||||||
observed_user=u
|
observed_user=user
|
||||||
)
|
)
|
||||||
|
|
||||||
if not visible:
|
if not visible:
|
||||||
@ -279,9 +279,9 @@ class PresenceHandler(BaseHandler):
|
|||||||
|
|
||||||
results = {}
|
results = {}
|
||||||
if local_users:
|
if local_users:
|
||||||
for u in local_users:
|
for user in local_users:
|
||||||
if u in self._user_cachemap:
|
if user in self._user_cachemap:
|
||||||
results[u] = self._user_cachemap[u].get_state()
|
results[user] = self._user_cachemap[user].get_state()
|
||||||
|
|
||||||
local_to_user = {u.localpart: u for u in local_users}
|
local_to_user = {u.localpart: u for u in local_users}
|
||||||
|
|
||||||
@ -295,9 +295,9 @@ class PresenceHandler(BaseHandler):
|
|||||||
res["status_msg"] = state["status_msg"]
|
res["status_msg"] = state["status_msg"]
|
||||||
results[local_to_user[local_part]] = res
|
results[local_to_user[local_part]] = res
|
||||||
|
|
||||||
for u in remote_users:
|
for user in remote_users:
|
||||||
# TODO(paul): Have remote server send us permissions set
|
# TODO(paul): Have remote server send us permissions set
|
||||||
results[u] = self._get_or_offline_usercache(u).get_state()
|
results[user] = self._get_or_offline_usercache(user).get_state()
|
||||||
|
|
||||||
for state in results.values():
|
for state in results.values():
|
||||||
if "last_active" in state:
|
if "last_active" in state:
|
||||||
|
Loading…
Reference in New Issue
Block a user