messages: Use get_user_including_cross_realm in create_mirrored_message_users.

This commit is contained in:
Vishnu Ks 2017-07-19 03:01:27 +05:30 committed by Tim Abbott
parent 9ebf5090d2
commit 0d6e92d946
1 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,8 @@ from zerver.lib.validator import \
check_list, check_int, check_dict, check_string, check_bool
from zerver.models import Message, UserProfile, Stream, Subscription, \
Realm, RealmDomain, Recipient, UserMessage, bulk_get_recipients, get_recipient, \
get_user_profile_by_email, get_stream, parse_usermessage_flags, email_to_domain, \
get_realm, get_active_streams, bulk_get_streams, get_user_including_cross_realm
get_stream, parse_usermessage_flags, email_to_domain, get_realm, get_active_streams, \
bulk_get_streams, get_user_including_cross_realm
from sqlalchemy import func
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:
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)
def same_realm_zephyr_user(user_profile, email):