mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Introduce muc_invite hook
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()
This commit is contained in:
parent
d97e777c9b
commit
a1faecc4c9
@ -5056,6 +5056,8 @@ process_invitations(From, InviteEls, Lang, StateData) ->
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user