You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mod_muc_allowners.lua 555B

123456789101112131415161718192021
  1. local is_healthcheck_room = module:require "util".is_healthcheck_room;
  2. module:hook("muc-occupant-joined", function (event)
  3. local room, occupant = event.room, event.occupant;
  4. if is_healthcheck_room(room.jid) then
  5. return;
  6. end
  7. room:set_affiliation(true, occupant.bare_jid, "owner");
  8. end, 2);
  9. module:hook("muc-occupant-left", function (event)
  10. local room, occupant = event.room, event.occupant;
  11. if is_healthcheck_room(room.jid) then
  12. return;
  13. end
  14. room:set_affiliation(true, occupant.bare_jid, nil);
  15. end, 2);