equal
deleted
inserted
replaced
74 stanza.attr.to = jid; |
74 stanza.attr.to = jid; |
75 core_route_stanza(origin, stanza); |
75 core_route_stanza(origin, stanza); |
76 end |
76 end |
77 end |
77 end |
78 if stanza.attr.type == nil and not origin.presence then -- initial presence |
78 if stanza.attr.type == nil and not origin.presence then -- initial presence |
|
79 origin.presence = stanza; -- FIXME repeated later |
79 local probe = st.presence({from = origin.full_jid, type = "probe"}); |
80 local probe = st.presence({from = origin.full_jid, type = "probe"}); |
80 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to |
81 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to |
81 if item.subscription == "both" or item.subscription == "to" then |
82 if item.subscription == "both" or item.subscription == "to" then |
82 probe.attr.to = jid; |
83 probe.attr.to = jid; |
83 core_route_stanza(origin, probe); |
84 core_route_stanza(origin, probe); |