mirror of https://github.com/zulip/zulip.git
messages: Use get_user_including_cross_realm in create_mirrored_message_users.
This commit is contained in:
parent
9ebf5090d2
commit
0d6e92d946
|
@ -39,8 +39,8 @@ from zerver.lib.validator import \
|
||||||
check_list, check_int, check_dict, check_string, check_bool
|
check_list, check_int, check_dict, check_string, check_bool
|
||||||
from zerver.models import Message, UserProfile, Stream, Subscription, \
|
from zerver.models import Message, UserProfile, Stream, Subscription, \
|
||||||
Realm, RealmDomain, Recipient, UserMessage, bulk_get_recipients, get_recipient, \
|
Realm, RealmDomain, Recipient, UserMessage, bulk_get_recipients, get_recipient, \
|
||||||
get_user_profile_by_email, get_stream, parse_usermessage_flags, email_to_domain, \
|
get_stream, parse_usermessage_flags, email_to_domain, get_realm, get_active_streams, \
|
||||||
get_realm, get_active_streams, bulk_get_streams, get_user_including_cross_realm
|
bulk_get_streams, get_user_including_cross_realm
|
||||||
|
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
from sqlalchemy.sql import select, join, column, literal_column, literal, and_, \
|
from sqlalchemy.sql import select, join, column, literal_column, literal, and_, \
|
||||||
|
@ -857,7 +857,7 @@ def create_mirrored_message_users(request, user_profile, recipients):
|
||||||
for email in referenced_users:
|
for email in referenced_users:
|
||||||
create_mirror_user_if_needed(user_profile.realm, email, fullname_function)
|
create_mirror_user_if_needed(user_profile.realm, email, fullname_function)
|
||||||
|
|
||||||
sender = get_user_profile_by_email(sender_email)
|
sender = get_user_including_cross_realm(sender_email, user_profile.realm)
|
||||||
return (True, sender)
|
return (True, sender)
|
||||||
|
|
||||||
def same_realm_zephyr_user(user_profile, email):
|
def same_realm_zephyr_user(user_profile, email):
|
||||||
|
|
Loading…
Reference in New Issue