From 094b29bb21d52910d2b05452bf20d590e2f1a13a Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Wed, 9 Feb 2022 03:03:28 -0600 Subject: [PATCH] Suggest `@room` when `@channel`, `@everyone`, or `@here` is typed in composer (#7737) Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- src/autocomplete/NotifProvider.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/autocomplete/NotifProvider.tsx b/src/autocomplete/NotifProvider.tsx index 52e235a1b1..a91a75598d 100644 --- a/src/autocomplete/NotifProvider.tsx +++ b/src/autocomplete/NotifProvider.tsx @@ -43,7 +43,9 @@ export default class NotifProvider extends AutocompleteProvider { if (!this.room.currentState.mayTriggerNotifOfType('room', client.credentials.userId)) return []; const { command, range } = this.getCurrentCommand(query, selection, force); - if (command && command[0] && '@room'.startsWith(command[0]) && command[0].length > 1) { + if (command?.[0].length > 1 && + ['@room', '@channel', '@everyone', '@here'].some(c => c.startsWith(command[0])) + ) { return [{ completion: '@room', completionId: '@room',