Scott Newman
2011-05-19 01:04:15 UTC
I'm relatively new to XMPP, but I think what I'm looking to do is feasible.
I've got a very simple bot and I'm trying to capture status/presence updates
and IQ messages.
I have these callbacks defined, but they don't seem to work when I expect
them to. When I'm in Adium or PSI and change my status from available to
away, I don't see these methods getting fired. (I do, however, see them
invoked when I first log in, but then not again) I've also tried manually
sending presence and IQ stanzas in PSI with the XML console, but I still
don't see any of my debugging statements.
Any advice/suggestions are greatly appreciated.
def start_query_callback
@xmpp_client.add_iq_callback do |query|
puts "Got IQ message"
end
end
def start_presence_callback
@xmpp_client.add_presence_callback do |priority, ref|
puts "got presence update"
end
end
Here's my full code:
http://friendpaste.com/6xVF9eCQ5BZpYPwcwatsrA
I've got a very simple bot and I'm trying to capture status/presence updates
and IQ messages.
I have these callbacks defined, but they don't seem to work when I expect
them to. When I'm in Adium or PSI and change my status from available to
away, I don't see these methods getting fired. (I do, however, see them
invoked when I first log in, but then not again) I've also tried manually
sending presence and IQ stanzas in PSI with the XML console, but I still
don't see any of my debugging statements.
Any advice/suggestions are greatly appreciated.
def start_query_callback
@xmpp_client.add_iq_callback do |query|
puts "Got IQ message"
end
end
def start_presence_callback
@xmpp_client.add_presence_callback do |priority, ref|
puts "got presence update"
end
end
Here's my full code:
http://friendpaste.com/6xVF9eCQ5BZpYPwcwatsrA