This adds a new hook that is triggered for each invite to an MUC room:
- muc_invite(RoomJID, RoomConfig, From, To, Reason) -> ok
where
- RoomJID = From = To = #jid (see jlib.h)
- RoomConfig = #config (see mod_muc_room.hrl)
- Reason = binary()
throw({error, ?ERRT_JID_MALFORMED(Lang, Txt)});
JID1 -> JID1
end,
+ ejabberd_hooks:run(muc_invite, StateData#state.server_host,
+ [StateData#state.jid, StateData#state.config, From, JID, Reason]),
ejabberd_router:route(StateData#state.jid, JID, Msg),
JID
end,