Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention all user #2245

Open
minhth1529 opened this issue Jan 18, 2024 · 4 comments
Open

Mention all user #2245

minhth1529 opened this issue Jan 18, 2024 · 4 comments
Labels

Comments

@minhth1529
Copy link

minhth1529 commented Jan 18, 2024

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

@minhth1529 minhth1529 added the feature New capability label Jan 18, 2024
@kennyvallejodev
Copy link

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 :)

@minhth1529
Copy link
Author

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

@kennyvallejodev
Copy link

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)

@zubhav
Copy link

zubhav commented Dec 6, 2024

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants