equal
deleted
inserted
replaced
2 local xmlns_csi = "urn:xmpp:csi:0"; |
2 local xmlns_csi = "urn:xmpp:csi:0"; |
3 local csi_feature = st.stanza("csi", { xmlns = xmlns_csi }); |
3 local csi_feature = st.stanza("csi", { xmlns = xmlns_csi }); |
4 |
4 |
5 local change = module:metric("counter", "changes", "events", "CSI state changes", {"csi_state"}); |
5 local change = module:metric("counter", "changes", "events", "CSI state changes", {"csi_state"}); |
6 |
6 |
7 local csi_handler_available = nil; |
|
8 module:hook("stream-features", function (event) |
7 module:hook("stream-features", function (event) |
9 if event.origin.username and csi_handler_available then |
8 if event.origin.username then |
10 event.features:add_child(csi_feature); |
9 event.features:add_child(csi_feature); |
11 end |
10 end |
12 end); |
11 end); |
13 |
12 |
14 function refire_event(name) |
13 function refire_event(name) |