diff options
author | Paweł Chmielowski <pawel@process-one.net> | 2022-11-23 15:16:43 +0100 |
---|---|---|
committer | Paweł Chmielowski <pawel@process-one.net> | 2022-11-23 15:16:43 +0100 |
commit | 514bab47a2ae87d6262e1d662a75247de17bb620 (patch) | |
tree | d97ffc97fec30c5c175f3df8326e1a1e22de8219 | |
parent | Add mqtt bridge module (diff) |
Add hook for mqtt publish event
-rw-r--r-- | src/mod_mqtt.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_mqtt.erl b/src/mod_mqtt.erl index 01950d64a..f20919206 100644 --- a/src/mod_mqtt.erl +++ b/src/mod_mqtt.erl @@ -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 -> @@ -603,7 +604,7 @@ match([H|T1], [<<"%c">>|T2], U, S, R) -> end; match([H|T1], [<<"%g">>|T2], U, S, R) -> case jid:resourceprep(H) of - H -> + H -> case acl:loaded_shared_roster_module(S) of undefined -> false; Mod -> |