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

Mention all user

Open minhth1529 opened this issue 2 years ago • 4 comments

I would like to use mention for all user, such as: @all or @here at mention list in current channel

minhth1529 avatar Jan 18 '24 04:01 minhth1529

As a workaround, for now you can implement a special @channel or @here that before sending the message.

once you have confirmed that the special mention is in the message, you can before sending the message. add in the mentioned_users everyone that belongs to the channel and that should do it... but yeah, definitely it will be dope to be in the lib without needing to do custom work :)

kennyvallejodev avatar Apr 18 '24 16:04 kennyvallejodev

Hi @kennyvallejodev I do not see the guide on document, can you please show me how can i get it?

minhth1529 avatar Apr 19 '24 02:04 minhth1529

There's not a guide, sorry. But from my side, this is how i implemented the @channel command from my side (as a workaround for the lack of the feature itself)

kennyvallejodev avatar Apr 19 '24 15:04 kennyvallejodev

@kennyvallejodev I managed to implement your solution from above where the global mention will map to all user IDs in the channel. However, I came across an interesting case where a channel has more than 25 users and sending a message with @channel leads to this error:

[Error: StreamChat error code 4: SendMessage failed with error: "message.mentioned_users must contain at maximum 25 items"]

Does anyone have an idea on how to overcome this?

zubhav avatar Dec 06 '24 09:12 zubhav

The feature is being forwarded internally. Any development regarding the request will be updated here too. Thank you

MartinCupela avatar Dec 12 '25 10:12 MartinCupela