mirror of https://github.com/zulip/zulip.git
get_user_by_id: Use delivery_email when finding cross-realm bots.
When actually looking for bots, it doesn't matter, but this feels more consistent with the other lookup code.
This commit is contained in:
parent
b85c9b0810
commit
caf4c7af8f
|
@ -2154,7 +2154,7 @@ def get_user_by_id_in_realm_including_cross_realm(
|
||||||
|
|
||||||
# Note: This doesn't validate whether the `realm` passed in is
|
# Note: This doesn't validate whether the `realm` passed in is
|
||||||
# None/invalid for the CROSS_REALM_BOT_EMAILS case.
|
# None/invalid for the CROSS_REALM_BOT_EMAILS case.
|
||||||
if user_profile.email in settings.CROSS_REALM_BOT_EMAILS:
|
if user_profile.delivery_email in settings.CROSS_REALM_BOT_EMAILS:
|
||||||
return user_profile
|
return user_profile
|
||||||
|
|
||||||
raise UserProfile.DoesNotExist()
|
raise UserProfile.DoesNotExist()
|
||||||
|
|
Loading…
Reference in New Issue