-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
MUC/Sub Persist Roles of a Subscriber #3330
Comments
Right, that's exactly the definition of "role", it's like affiliation but non-persistent:
Then you propose:
If I understand this correctly, this would go against the XEP, right? That is perfectly acceptable if you control both the server and the clients... But I doubt that would be acceptable for an open XMPP server. |
hi @badlop . According to the XEP
Do you know if there are plans to implement the persistence of roles in Ejabberd? Currently if a moderator revokes voice from a user and the user leaves and re-joins the room, the role is back at "participant". Do you know of any other way to implement this as to honor the moderator's decission? |
Just for curiosity, I've implemented it in badlop@58ca0a4 so you can apply that and try it |
thanks! I will give it a look |
This feature goes against the XEP, and only one person asked for it, so it will not be included in ejabberd. Anybody interested, can find the patch in badlop@58ca0a4 |
I really can't see how this goes against the XEP, given it says that the implementation "SHOULD" persist them for moderated rooms, which is critical to their expected behaviour. (https://xmpp.org/extensions/xep-0045.html#roles and quoted in my previous comment). I do see if this is not a priority for Ejabberd right now. |
Out of curiosity:
Why? Basically everyone else I've seen implementing modern group chat based on MUC doesn't care about roles but just uses affiliations, which are clearly meant to be persistent, without ambiguity/weirdness in the spec. |
hi @weiss , I can't speak for @partikmadan 's use case, but I can tell you about mine: I'm developing a multi-user chat application targeted at education. Each class has a chat room, and in it the teacher acts as moderator. As such they can "mute" a student by revoking their "voice" (updating their role to "Visitor"). In that case the student should remain able to join the room and receive messages; it's only the sending of messages that becomes disallowed. That means the affiliation of the student remains as "Member". (Our rooms are members-only and only valid enrolled students can join them). Since the privilege of sending messages is tied to the role and not to the affiliation I realized I needed a way to have the role change persisted between different user visits to the room, until the moderator decides to grant them "voice" back. |
Ah, right, I quick-read this thread again, and the term "temporary" always confuses me. This issue got closed after several months awaiting feedback about the patch, and awaiting somebody else showing interest. So, were you able to test the patch? What inconveniences did you find? Weird behaviour, etc. |
Thanks @badlop for getting back to this. No, I'm afraid I haven't been able to test it yet (and I lack the expertise to do so easily). I'll probably get back to you in a few weeks. Until then feel free to dismiss the issue, given that no one else has shown interest in it so far. Thanks again! |
@badlop: Maybe good to reopen this ticket? |
I would like to second the request for this feature to be (re?)implemented. I found out the hard way that roles were not persisted for moderated rooms when a user was muted and subsequently rejoined, leading to a somewhat nasty argument. I think this is in line with the spec, going off of the SHOULD persist clause. |
I'll quote myself:
|
I wasn't sure if you still needed feedback on the patch. We've been using it for a couple of days and the patch seems to work fine, thank you. We ran into one minor issue, and I'm really pretty sure it was totally unrelated to the patch, but in the spirit of honestly I'll disclose it: We had a user who was kicked from a room, invited back, and despite being present in the member list, was not able to join and was rejected with a "registration required" error. He had to be re-kicked and re-added. This is on ejabberd version 22.05 with erlang/OTP 24, with only badlop@8ca02f7 merged into the build. |
Ok, I see what's happening here. I'm not quite sure how to proceed. |
We decided to just not persist none roles.
in
|
Sounds sane to me. For persistent banning, affiliations should be updated. |
Ok, then those two commits implement the feature, avoid the problematic cases, and are ready to merge right? |
I believe so. I don't know if anybody else has been testing this, but we are having no issues with it on our service. 👍 |
Ok, I've committed those changes in ejabberd. |
Is your feature request related to a problem? Please describe.
Currently roles are not part of subscribers list and not persisted in db.
Describe the solution you'd like
To make the role persistent just like affiliation.
Describe alternatives you've considered
Will look into updating the source code if there is no other way.
Additional context
As to implement a modern chat app i need to distinguish visitor from participants in a muc-sub enabled muc room. Currently i am not able to think of any solution for that.
The text was updated successfully, but these errors were encountered: