Typing @@ shows `@everyone` and `@here`

(#621) Bug Closed: Fixed messaging

Summary

(originally reported in #440; still happening) Typing @@ shows @everyone and @here in the autocomplete despite them not containing the substring @@. This is inconsistent with the roles which do not show up Some people like to end their messages with ^^ and if they accidentally type @@ (note: I am unsure how exactly this happens but I witnessed it in a fairly large server) and press enter instead that's a recipe for disaster The simplest fix would probably be to add substring(1) here: https://github.com/fluxerapp/fluxer/blob/refactor/fluxer_app/src/hooks/useTextareaAutocomplete.tsx#L802
return mention.kind.substring(1).toLowerCase().includes(queryForMatching.toLowerCase());
or add @ to the query
return mention.kind.toLowerCase().includes("@" + queryForMatching.toLowerCase());

Steps to reproduce

  1. Type @ twice the chatbox.
  2. Observe all mentions apart from @everyone and @here disappearing.
  1. The pull request fluxer#1529 mentions this post Merged
  2. The pull request fluxer#1529 was merged Merged

Merged posts

These posts were merged into this one. Their comments are now part of the conversation below, marked with where they came from.

Merged from #440 Typing @@ shows `@everyone` and `@here`

RexSystemoriginally by @TheKodeToad on GitHub

Report details

Summary

Typing @@ shows @everyone and @here in the autocomplete despite them not containing the substring @@. This is inconsistent with the roles which do not show up Some people like to end their messages with ^^ and if they accidentally type @@ (note: I am unsure how exactly this happens but I witnessed it in a fairly large server) and press enter instead that's a recipe for disaster The simplest fix would probably be to add substring(1) here: https://github.com/fluxerapp/fluxer/blob/refactor/fluxer_app/src/hooks/useTextareaAutocomplete.tsx#L802
return mention.kind.substring(1).toLowerCase().includes(queryForMatching.toLowerCase());
or add @ to the query
return mention.kind.toLowerCase().includes("@" + queryForMatching.toLowerCase());

Steps to reproduce

  1. Type @ twice the chatbox.
  2. Observe all mentions apart from @everyone and @here disappearing.

2 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote edited
Status changed from Fixed to Awaiting confirmation
This may be fixed in the current version. If it still happens for you, please say so here.
Comment by Rex
RexSystem 1 vote
Status changed from Awaiting confirmation to Fixed
Imported from GitHub, fix shipped. Closed in bulk.