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; |