diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-06-03 22:26:48 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-06-03 22:26:48 +0100 |
commit | 43c83b93420116f1ed88981268bbe8e7919dd27e (patch) | |
tree | 998c811673d5f23a172fe27d8c6a7b57139d3a2d | |
parent | 59b96c51b0037eeaf02da285cb66b6910e5efe49 (diff) | |
download | prosody-43c83b93420116f1ed88981268bbe8e7919dd27e.tar.gz prosody-43c83b93420116f1ed88981268bbe8e7919dd27e.zip |
util.adminstream: Fire event based on stanza name too for convenience
-rw-r--r-- | util/adminstream.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/adminstream.lua b/util/adminstream.lua index 4583b322..70fa2b19 100644 --- a/util/adminstream.lua +++ b/util/adminstream.lua @@ -271,7 +271,9 @@ local function new_client() client.thread = runner(function (stanza) if st.is_stanza(stanza) then - client.events.fire_event("received", stanza); + if not client.events.fire_event("received", stanza) and not stanza.attr.xmlns then + client.events.fire_event("received/"..stanza.name, stanza); + end elseif stanza.stream == "opened" then stream_callbacks._streamopened(client, stanza.attr); client.events.fire_event("connected"); |