Change if(realm.domain == mit.edu) to use Realm.is_zephyr_mirror_realm.

This commit is contained in:
Rishi Gupta
2017-03-13 11:14:09 -07:00
committed by Tim Abbott
parent 3aae6cd421
commit 3645bb9225
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ def check_and_create_attachments(apps, schema_editor):
is_message_realm_public = False
if message.recipient.type == STREAM:
stream = Stream.objects.get(id=message.recipient.type_id)
is_message_realm_public = not stream.invite_only and stream.realm.domain != "mit.edu"
is_message_realm_public = not stream.invite_only and not stream.realm.is_zephyr_mirror_realm
if path_id is not None:
attachment = Attachment.objects.create(