From 36e00308b8167ef53dd2c749c5cb6cd4484acc13 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Fri, 19 Apr 2024 13:20:33 +0200 Subject: [PATCH] web-compose-warnings: Update banners for stream rename channel. Updates warning string when linking to a private stream/channel when composing a message in the web app to use channel instead of stream. Updates error banner when using a stream/channel wildcard mention when composing a message in the web app to use channel instead of stream. Part of stream to channel rename project. --- web/src/compose_validate.ts | 4 ++-- web/templates/compose_banner/private_stream_warning.hbs | 2 +- .../compose_banner/wildcard_mention_not_allowed_error.hbs | 4 ++-- web/tests/compose_validate.test.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/compose_validate.ts b/web/src/compose_validate.ts index 52222a0708..21b721719f 100644 --- a/web/src/compose_validate.ts +++ b/web/src/compose_validate.ts @@ -187,7 +187,7 @@ export function warn_if_private_stream_is_linked( const new_row_html = render_private_stream_warning({ stream_id: linked_stream.stream_id, banner_type: compose_banner.WARNING, - stream_name: linked_stream.name, + channel_name: linked_stream.name, classname: compose_banner.CLASSNAMES.private_stream_warning, }); compose_banner.append_compose_banner_to_banner_list($(new_row_html), $banner_container); @@ -514,7 +514,7 @@ export function validate_stream_message_mentions(opts: StreamWildcardOptions): b const new_row_html = render_wildcard_mention_not_allowed_error({ banner_type: compose_banner.ERROR, classname: compose_banner.CLASSNAMES.wildcards_not_allowed, - stream_wildcard_mention: opts.stream_wildcard_mention, + wildcard_mention_string: opts.stream_wildcard_mention, }); compose_banner.append_compose_banner_to_banner_list( $(new_row_html), diff --git a/web/templates/compose_banner/private_stream_warning.hbs b/web/templates/compose_banner/private_stream_warning.hbs index e64678393b..c5567031c9 100644 --- a/web/templates/compose_banner/private_stream_warning.hbs +++ b/web/templates/compose_banner/private_stream_warning.hbs @@ -1,5 +1,5 @@ {{#> compose_banner }} {{/compose_banner}} diff --git a/web/templates/compose_banner/wildcard_mention_not_allowed_error.hbs b/web/templates/compose_banner/wildcard_mention_not_allowed_error.hbs index b05ba39e23..2ca370bd58 100644 --- a/web/templates/compose_banner/wildcard_mention_not_allowed_error.hbs +++ b/web/templates/compose_banner/wildcard_mention_not_allowed_error.hbs @@ -1,7 +1,7 @@ {{#> compose_banner }}