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

Feature Request: Programmatically detach a client from channel. #1744

Open
Dajust opened this issue Apr 17, 2024 · 3 comments
Open

Feature Request: Programmatically detach a client from channel. #1744

Dajust opened this issue Apr 17, 2024 · 3 comments
Labels
enhancement New feature or improved functionality.

Comments

@Dajust
Copy link

Dajust commented Apr 17, 2024

Similar to using presence.leaveClient to remove a client from a presence, we should have a way to detach a client from a channel. Something like channel.detachClient(client123).

Use Case: In a chat application, an admin might want to remove a participant from the chat room.

Current workaround: Currently we have to signal the client to detach from the chat room.

┆Issue is synchronized with this Jira Task by Unito

@ttypic ttypic added the enhancement New feature or improved functionality. label Apr 17, 2024
@ttypic
Copy link
Collaborator

ttypic commented Apr 18, 2024

Hey @Dajust, thanks for bringing this to our attention! Right now, the recommended way to implement this is using token auth and the capabilities feature. In case a moderator wants to change a user’s permissions, the backend can revoke the current token and issue a new one with adjusted capabilities. Would this work for you?

@Dajust
Copy link
Author

Dajust commented Apr 18, 2024

Thanks for your response @ttypic. But the capabilities stuff doesn't quite work for my case. I want to remove a client from a channel, not block them from future access to the channel. Similar to how presence.leaveClient doesn't prevent the client from re-entering the presence. I think I'll continue using my workaround for now. Thanks.

@ttypic
Copy link
Collaborator

ttypic commented Apr 18, 2024

@Dajust Could you tell us more about your use case? Why might an admin want to remove a participant from the chat but not prevent them from re-entering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

No branches or pull requests

2 participants