mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
streams: Disable inline URL preview when rendering stream descriptions.
We want to use the baseline features of bugdown, but not fancy things like inline URL previews, since the whole structure of stream descriptions is to have a single-line thing supporting some formatting. The migration part of this change fixes a bug encountered by some organizations upgrading from older versions of Zulip.
This commit is contained in:
@@ -1751,7 +1751,7 @@ def create_stream_if_needed(realm: Realm,
|
||||
)
|
||||
|
||||
if created:
|
||||
stream.rendered_description = bugdown_convert(stream.description)
|
||||
stream.rendered_description = bugdown_convert(stream.description, no_previews=True)
|
||||
stream.save(update_fields=["rendered_description"])
|
||||
Recipient.objects.create(type_id=stream.id, type=Recipient.STREAM)
|
||||
if stream.is_public():
|
||||
@@ -3505,7 +3505,7 @@ def do_rename_stream(stream: Stream,
|
||||
|
||||
def do_change_stream_description(stream: Stream, new_description: str) -> None:
|
||||
stream.description = new_description
|
||||
stream.rendered_description = bugdown_convert(new_description)
|
||||
stream.rendered_description = bugdown_convert(new_description, no_previews=True)
|
||||
stream.save(update_fields=['description', 'rendered_description'])
|
||||
|
||||
event = dict(
|
||||
|
||||
Reference in New Issue
Block a user