199 if rostermanager.subscribed(node, host, to_bare) then |
199 if rostermanager.subscribed(node, host, to_bare) then |
200 rostermanager.roster_push(node, host, to_bare); |
200 rostermanager.roster_push(node, host, to_bare); |
201 end |
201 end |
202 core_post_stanza(origin, stanza); |
202 core_post_stanza(origin, stanza); |
203 send_presence_of_available_resources(node, host, to_bare, origin); |
203 send_presence_of_available_resources(node, host, to_bare, origin); |
|
204 core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); |
204 elseif stanza.attr.type == "unsubscribed" then |
205 elseif stanza.attr.type == "unsubscribed" then |
205 -- 1. send unavailable |
206 -- 1. send unavailable |
206 -- 2. route stanza |
207 -- 2. route stanza |
207 -- 3. roster push (subscription = from or both) |
208 -- 3. roster push (subscription = from or both) |
208 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); |
209 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); |