New Prosody Module to set MUC affiliations for local users on registration. #21

Open
opened 2022-06-02 19:38:30 +00:00 by phryk · 0 comments
Owner

This should be pretty straightforward.

Look at https://hg.prosody.im/prosody-modules/file/27f7ed9f50cd/mod_groups_internal/mod_groups_internal.lua

Specifically setup() (and how it's hooked) to get a working reference
to the MUC module.

Relevant hooks: for affiliations:

  • ??? user-registered exists, but is only fired by mod_register_ibr (in-band reg)
    • -> might need an upstream fix
    • -> mod_watchregistrations also depends on this event, deploy it and check if the event is fired for invite-based registrations
      • -> mod_invites_register_api fires this event, so we good. (:
    • Zash says:
      prosodyctl adduser however does not
      Also, e.g. where accounts are not created via prosody,
      but the authentication module just declares a previously
      unknown user login successful
      Hooking authentication or resource binding won't be
      affected by that
      * -> resource-bind.
  • user-deleted

Also, setting affiliation:

room:set_affiliation(true, user_jid, "member")

~~This should be pretty straightforward.~~ Look at https://hg.prosody.im/prosody-modules/file/27f7ed9f50cd/mod_groups_internal/mod_groups_internal.lua Specifically `setup()` (and how it's hooked) to get a working reference to the MUC module. Relevant hooks: for affiliations: * ??? `user-registered` exists, but is only fired by `mod_register_ibr` (in-band reg) * -> might need an upstream fix * -> `mod_watchregistrations` also depends on this event, deploy it and check if the event is fired for invite-based registrations * -> `mod_invites_register_api` fires this event, so we good. (: * Zash says: `prosodyctl adduser` however does not Also, e.g. where accounts are not created via prosody, but the authentication module just declares a previously unknown user login successful Hooking authentication or resource binding won't be affected by that * -> `resource-bind`. * `user-deleted` Also, setting affiliation: `room:set_affiliation(true, user_jid, "member")`
phryk added the
moderation
enhancement
security
labels 2022-06-02 19:38:30 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: phryk-evil-mad-sciences-llc/xmpp-service#21
No description provided.