lib/blather/client/client.rb in blather-0.5.2 vs lib/blather/client/client.rb in blather-0.5.3
- old
+ new
@@ -224,9 +224,13 @@
# register_handler :iq, :type => [:get, :set] do |iq|
# write StanzaError.new(iq, 'service-unavailable', :cancel).to_node
# end
+ register_handler :ping, :type => :get do |ping|
+ write ping.reply
+ end
+
register_handler :status do |status|
roster[status.from].status = status if roster[status.from]
nil
end