mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
models: Refactor get_fake_email_domain to take realm.host as arg.
This commit updates get_fake_email_domain to accept realm.host as argument instead of the Realm object since we only use realm.host to get the fake email domain. This is a preparatory commit for the limited guest feature as we would be sending the fake email of the message sender in message event object to a guest user who cannot access the sender and there we would need to compute the fake email.
This commit is contained in:
@@ -796,7 +796,9 @@ def get_cross_realm_dicts() -> List[APIUserDict]:
|
||||
|
||||
|
||||
def get_data_for_inaccessible_user(realm: Realm, user_id: int) -> APIUserDict:
|
||||
fake_email = Address(username=f"user{user_id}", domain=get_fake_email_domain(realm)).addr_spec
|
||||
fake_email = Address(
|
||||
username=f"user{user_id}", domain=get_fake_email_domain(realm.host)
|
||||
).addr_spec
|
||||
|
||||
# We just set date_joined field to UNIX epoch.
|
||||
user_date_joined = timestamp_to_datetime(0)
|
||||
|
||||
Reference in New Issue
Block a user