mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Change if(realm.domain == mit.edu) to use Realm.is_zephyr_mirror_realm.
This commit is contained in:
		@@ -20,7 +20,7 @@ def migrate_existing_data(apps, schema_editor):
 | 
			
		||||
            if owner == message.sender:
 | 
			
		||||
                if message.recipient.type == Recipient.STREAM:
 | 
			
		||||
                    stream = Stream.objects.get(id=message.recipient.type_id)
 | 
			
		||||
                    is_realm_public = stream.realm.domain != "mit.edu" and not stream.invite_only
 | 
			
		||||
                    is_realm_public = not stream.realm.is_zephyr_mirror_realm and not stream.invite_only
 | 
			
		||||
                    entry.is_realm_public = entry.is_realm_public or is_realm_public
 | 
			
		||||
 | 
			
		||||
        entry.save()
 | 
			
		||||
 
 | 
			
		||||
@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user