The mention popup in ChatInput fires whenever you type @ after a space. Problem is, that also matches email addresses — typing something like contact admin @example.com pops up the member list and starts filtering against "example.com".
The trigger logic in useSearchMentionUser.js:23-26:
if (
lastChar === '@' &&
(message.length === 1 || message[message.length - 2] === ' ')
)
It checks "is this an @ after a space?" but doesn't try to figure out whether the user is mentioning someone or just typing an email.
Steps to reproduce:
- Open EmbeddedChat in any room
- In the message input, type
contact admin @example.com
- The mention popup appears as soon as you hit
@
- It filters members against "example.com"
Expected behavior:
Mention popup shouldn't fire when the user is typing an email address.
Actual behavior:
Popup fires on any @ preceded by a space. You have to dismiss it or ignore it while finishing the email.
Code reference:
packages/react/src/hooks/useSearchMentionUser.js:23-26
The mention popup in ChatInput fires whenever you type
@after a space. Problem is, that also matches email addresses — typing something likecontact admin @example.compops up the member list and starts filtering against "example.com".The trigger logic in
useSearchMentionUser.js:23-26:It checks "is this an
@after a space?" but doesn't try to figure out whether the user is mentioning someone or just typing an email.Steps to reproduce:
contact admin @example.com@Expected behavior:
Mention popup shouldn't fire when the user is typing an email address.
Actual behavior:
Popup fires on any
@preceded by a space. You have to dismiss it or ignore it while finishing the email.Code reference:
packages/react/src/hooks/useSearchMentionUser.js:23-26