lib/vines/stanza/presence/unsubscribed.rb in vines-0.2.1 vs lib/vines/stanza/presence/unsubscribed.rb in vines-0.3.0
- old
+ new
@@ -14,18 +14,19 @@
self['from'] = stream.user.jid.bare.to_s
to = stamp_to
return unless stream.user.subscribed_from?(to)
send_unavailable(stream.user.jid, to)
- local? ? process_inbound : route
stream.user.remove_subscription_from(to)
storage.save_user(stream.user)
stream.update_user_streams(stream.user)
+ local? ? process_inbound : route
+
contact = stream.user.contact(to)
- router.interested_resources(stream.user.jid).each do |recipient|
+ stream.interested_resources(stream.user.jid).each do |recipient|
contact.send_roster_push(recipient)
end
end
def process_inbound
@@ -37,10 +38,10 @@
contact = user.contact(stream.user.jid)
contact.unsubscribe_to
storage(to.domain).save_user(user)
stream.update_user_streams(user)
- router.interested_resources(to).each do |recipient|
+ stream.interested_resources(to).each do |recipient|
recipient.write(@node)
contact.send_roster_push(recipient)
end
end
end