plugins/mod_presence.lua

changeset 1023
c0a3ef0a1f34
parent 1019
8d750336e517
child 1044
41a0c76127f4
equal deleted inserted replaced
1022:820995fbb7cf 1023:c0a3ef0a1f34
39 core_route_stanza(origin, stanza); 39 core_route_stanza(origin, stanza);
40 end 40 end
41 end 41 end
42 42
43 function handle_normal_presence(origin, stanza, core_route_stanza) 43 function handle_normal_presence(origin, stanza, core_route_stanza)
44 error("hello world")
45 if origin.roster then 44 if origin.roster then
46 for jid in pairs(origin.roster) do -- broadcast to all interested contacts 45 for jid in pairs(origin.roster) do -- broadcast to all interested contacts
47 local subscription = origin.roster[jid].subscription; 46 local subscription = origin.roster[jid].subscription;
48 if subscription == "both" or subscription == "from" then 47 if subscription == "both" or subscription == "from" then
49 stanza.attr.to = jid; 48 stanza.attr.to = jid;

mercurial