mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 22:19:48 +00:00
refactor: Extract stream_data.clean_up_description().
We use this in the few places where update_calculated_fields() could plausibly be dealing with a new rendered description.
This commit is contained in:
@@ -60,10 +60,6 @@ export function update_calculated_fields(sub) {
|
||||
sub.preview_url = hash_util.by_stream_uri(sub.stream_id);
|
||||
sub.is_old_stream = sub.stream_weekly_traffic !== null;
|
||||
|
||||
if (sub.rendered_description !== undefined) {
|
||||
sub.rendered_description = sub.rendered_description.replace("<p>", "").replace("</p>", "");
|
||||
}
|
||||
|
||||
// Apply the defaults for our notification settings for rendering.
|
||||
for (const setting of settings_config.stream_specific_notification_settings) {
|
||||
sub[setting + "_display"] = stream_data.receives_notifications(sub.stream_id, setting);
|
||||
|
||||
Reference in New Issue
Block a user