New Prosody modules to control a tokenized room: token_affiliation and token_owner_party

what is the outcast?
can you give an example or source code and explain it more?

1 Like

Yes, my code is similar to yours!
It seems that the plugin is ok because the error I mentioned occurs before the termination time.

I revert it to room:clear and room:destroy, and tinkering with enableIceRestart: false/true.

@emrah In below module, I want to control the conference_max_minutes using jwt token. Is it possible?

The module has not such a feature but you can add your customization

Thanks for responding @emrah . How can I get the value from JWT and use it in lua script? It would be great help if can share any reference.

Check the mod_token_affiliation.lua code. The affiliation field…

1 Like

Hey, do you know a prodosy module to custom the user id by the token content?


Do you mean the official prodosy module: . Do I need to modify the code to achieve my goal?

yes, this module…

No need to customize any code to set username… But if you means userid used by prosody, no idea…

I have tried your two modules.
When I join a fresh room with affiliation=“member”, it works well and receives “NOT_ALLOWED_ERROR” as expected.
But when there is a moderator exists in the room, after I joined it with affiliation=“member”, my role will change from “none” to “moderator”.

It works as expected on my side, I couldn’t reproduce the same issue.

hey, sorry to disturb you again.
When the owner leave the room, can the members receive the “” event?
(On my local server with your two plugins, the members in the room don’t receive any event to know the owner left, except the message:“The owner is gone”.)

I didn’t check which event is triggered but when the owner gone, the members receive both the chat message and the disconnected message (the info box on the UI)