mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 03:50:15 +02:00
Add hook for mqtt publish event
This commit is contained in:
parent
fbea49dbab
commit
514bab47a2
1 changed files with 2 additions and 1 deletions
|
@ -128,6 +128,7 @@ publish({_, S, _} = USR, Pkt, ExpiryTime) ->
|
|||
allow ->
|
||||
case retain(USR, Pkt, ExpiryTime) of
|
||||
ok ->
|
||||
ejabberd_hooks:run(mqtt_publish, S, [USR, Pkt, ExpiryTime]),
|
||||
Mod = gen_mod:ram_db_mod(S, ?MODULE),
|
||||
route(Mod, S, Pkt, ExpiryTime);
|
||||
{error, _} = Err ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue