diff options
author | Matthew Wild <mwild1@gmail.com> | 2019-03-19 09:08:06 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2019-03-19 09:08:06 +0000 |
commit | 8189ab0bcdceea2c6ee2df4c1fb522242d8e1533 (patch) | |
tree | abde9bfcc2fcad543e465cfbfc7a29410de141f7 /plugins | |
parent | 75db23afc67254286b7d0bb94c8e5945f32c8068 (diff) | |
download | prosody-8189ab0bcdceea2c6ee2df4c1fb522242d8e1533.tar.gz prosody-8189ab0bcdceea2c6ee2df4c1fb522242d8e1533.zip |
mod_component: Set module status to indicate whether component is connected
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_component.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index b8c87dee..b1ffc81d 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -49,6 +49,7 @@ function module.add_host(module) local send; local function on_destroy(session, err) --luacheck: ignore 212/err + module:set_status("warn", err and ("Disconnected: "..err) or "Disconnected"); env.connected = false; env.session = false; send = nil; @@ -102,6 +103,7 @@ function module.add_host(module) module:log("info", "External component successfully authenticated"); session.send(st.stanza("handshake")); module:fire_event("component-authenticated", { session = session }); + module:set_status("info", "Connected"); return true; end |