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

Allow to use user group with roles on create/update chat room. #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rburakov
Copy link

Hello!
We can use Add group with role to chat room endpoint to add a new group with role to a room. Suppose, it should be also possible to do when creating / updating a chat room.
E.g.:

<chatRoom>
    <roomName>global</roomName>
    ...
    <members>
        <member>user1@localhost</member>
        <member>user2</member>
        <member>group1</member>
    </members>
    ...
</chatRoom>

Please review and let me know what do you think.

@Redor
Copy link
Contributor

Redor commented May 24, 2020

How would you differentiate between a member and a group? E.g.
We have a user called "test" and we have a group called "test".
It would be something like:

        <member>test</member>
        <member>test</member>

@rburakov
Copy link
Author

Hi Roman,
Thank you for your feedback.

Using user bare JID for user member together with a group name for group member will fix the issue:

<members>
    <member>test@localhost</member>
    <member>test</member>
</members>

In case when a username (not a bare JID) is specified and it equals to a group name, group wins.
E.g. next request will add a group member if test group is exist:

<members>
    <member>test</member>
</members>

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

Successfully merging this pull request may close these issues.

2 participants