Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Fix merge attribute & format
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Sep 1, 2022
1 parent ff2dc09 commit eb60b71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions synapse/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ async def _wrapped_get_user_by_req(
errcode=Codes.EXPIRED_ACCOUNT,
)

if ip_addr and (
not requester.app_service or self._track_appservice_user_ips
) and not requester.user_id.startswith("@_"):
if (
ip_addr
and (not requester.app_service or self._track_appservice_user_ips)
and not requester.user.to_string().startswith("@_")
):
# XXX(quenting): I'm 95% confident that we could skip setting the
# device_id to "dummy-device" for appservices, and that the only impact
# would be some rows which whould not deduplicate in the 'user_ips'
Expand Down

0 comments on commit eb60b71

Please sign in to comment.