stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

bug: mentions in some scenarios doesn't work

Open kennyvallejodev opened this issue 2 months ago • 1 comments

Describe the bug

A clear and concise description of what the bug is. There are some cases where the mentions don't work at all (it don't render the component as a mention)

  • Whenever you have a name that has an emote in it (e.g Kenny🟢)

https://github.com/GetStream/stream-chat-react/assets/42121336/94fa3eb0-7222-4b4a-ba1c-b54c82962e6a

  • Whenever you have a name that has some spaces in it (e.g Kenny. )

https://github.com/GetStream/stream-chat-react/assets/42121336/e5a85311-2b5a-4662-8d8e-784fbd29c677

  • Whenever the name of the user you mentioned before is changed (the mention stop working)

Creating the mention (and working) (by creating the video i found another problem :)))) okay guys i definitely need some help here to fix this. is driving me crazy)

https://github.com/GetStream/stream-chat-react/assets/42121336/103cc657-6171-45a6-bfe4-ef3cb1a0f0e2

Mentioning the same user but with a new name

https://github.com/GetStream/stream-chat-react/assets/42121336/7c4265d2-28f2-433c-84c0-f43491050888

To Reproduce

Steps to reproduce the behavior:

Scenarios [a] emote in name 1. go to chat 2. set your name as Kenny🟢) 3. with another user in a channel where both user are members try to mention @Kenny🟢

[b] spaces in name 1. go to chat 2. set your name as Kenny. ) 3. with another user in a channel where both user are members try to mention @Kenny.

[b] old mention broken after same user change their name 1. go to chat 2. set your name as Kenny) 3. with another user in a channel where both user are members try to mention @Kenny 4. now as Kenny go again and change your name now to Kenny 2 5. with the same other user, try to mention @Kenny 2 6. The @Kenny 2 mention will work but the old @Kenny mention will stop working and will be displayed as a normal text

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Package version

  • stream-chat-react: ^11.14.0
  • stream-chat: ^8.25.1

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS Sonoma 14
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22] 123

~Smartphone (please complete the following information):~

Additional context

kennyvallejodev avatar Apr 18 '24 16:04 kennyvallejodev