mirror of https://github.com/zulip/zulip.git
streams: Unset is_realm_public on attachment when unarchiving streams.
We did not unset is_realm_public field on attachements when unarchiving streams, but we do unset is_web_public field. This commit adds code to unset the is_realm_public field as well as we make the stream private while unarchiving it.
This commit is contained in:
parent
1f3a53db2d
commit
30e2c14f4a
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue