mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
mentions: Replace "channel" wildcard when selected via typeahead.
Until "stream" is renamed to "channel" in user facing strings, when "channel" is selected from the composebox typeahead options, the "stream" wildcard syntax will be inserted in the message content instead. Adds some helper functions to util.ts to initially be used to check/convert "channel" to "stream" during the rename process, with the intention of then converting those helpers for the reverse (check/convert "stream" to "channel") in the final part of the rename process. Part of project to rename "stream" to "channel".
This commit is contained in:
committed by
Tim Abbott
parent
e700e818e5
commit
80d4a704fe
@@ -1360,8 +1360,13 @@ export function get_mention_syntax(full_name: string, user_id?: number, silent =
|
||||
} else {
|
||||
mention += "@**";
|
||||
}
|
||||
mention += full_name;
|
||||
const wildcard_match = full_name_matches_wildcard_mention(full_name);
|
||||
if (wildcard_match && user_id === undefined) {
|
||||
mention += util.canonicalize_stream_synonym(full_name);
|
||||
} else {
|
||||
mention += full_name;
|
||||
}
|
||||
|
||||
if (user_id === undefined && !wildcard_match) {
|
||||
blueslip.warn("get_mention_syntax called without user_id.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user