Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Unset is_realm_public on attachment when unarchiving streams.
Sahil Batra30e2c14f4a82
diff --git a/zerver/actions/streams.py b/zerver/actions/streams.pyindex e64d71ee2cb..030778a5476 100644--- a/zerver/actions/streams.py+++ b/zerver/actions/streams.py@@ -201,10 +201,13 @@ def do_unarchive_stream().only("id")cache_delete_many(to_dict_cache_key_id(message.id) for message in messages)- # Unset the is_web_public cache on attachments, since the stream is now private.- Attachment.objects.filter(messages__recipient_id=stream.recipient_id).update(is_web_public=None)+ # Unset the is_web_public and is_realm_public cache on attachments,+ # since the stream is now private.+ Attachment.objects.filter(messages__recipient_id=stream.recipient_id).update(+ is_web_public=None, is_realm_public=None+ )ArchivedAttachment.objects.filter(messages__recipient_id=stream.recipient_id).update(- is_web_public=None+ is_web_public=None, is_realm_public=None)RealmAuditLog.objects.create(