comparison mod_csi/mod_csi.lua @ 1590:fbb4cd2922a1

mod_csi: Update namespace to published version
author Kim Alvefur <zash@zash.se>
date Fri, 09 Jan 2015 11:36:31 +0100
parents 90fe03e65d2c
children eaf0b1e95016
comparison
equal deleted inserted replaced
1589:0da51b825263 1590:fbb4cd2922a1
1 local st = require "util.stanza"; 1 local st = require "util.stanza";
2 local csi_feature = st.stanza("csi", { xmlns = "urn:xmpp:csi" }); 2 local xmlns_csi = "urn:xmpp:csi:0";
3 local csi_feature = st.stanza("csi", { xmlns = xmlns_csi });
3 4
4 module:hook("stream-features", function (event) 5 module:hook("stream-features", function (event)
5 if event.origin.username then 6 if event.origin.username then
6 event.features:add_child(csi_feature); 7 event.features:add_child(csi_feature);
7 end 8 end
12 if event.origin.username then 13 if event.origin.username then
13 module:fire_event(name, event); 14 module:fire_event(name, event);
14 return true; 15 return true;
15 end 16 end
16 end; 17 end;
17
18 end 18 end
19 19
20 module:hook("stanza/urn:xmpp:csi:active", refire_event("csi-client-active")); 20 module:hook("stanza/"..xmlns_csi..":active", refire_event("csi-client-active"));
21 module:hook("stanza/urn:xmpp:csi:inactive", refire_event("csi-client-inactive")); 21 module:hook("stanza/"..xmlns_csi..":inactive", refire_event("csi-client-inactive"));
22 22