hi,
i'm desperately trying to write my own jabber client for a rails app and i'm
using xmpp4r. i've been successful at getting the roster list to update via
ajax periodic call, but the roster list shows all users not just online
ones. looking through the examples i found getonline.rb in the advanced
examples directory, but i've had no luck getting the script to run
successfully. i've tried hardcoding the jid, password, and domain as well as
passing them as parameters. i suspect that the problems i'm having have
something to do with the using the admin resource type? really not sure.
i've also tried looking throught the rdocs and tried writing my own code. i
have something to the effect of:
cl.add_iq_callback { |i|
if i.type == :result and i.query.kind_of?(IqQueryRoster)
i.query.each_element { |e|
puts e.to_s if e.online?
}
stopflag = true #flag that we are done..
end
}
and this didn't work either. i've been looking through the rdocs for more
ideas, but i'm reaching my wit's end here. any help would greatly be
appreciated. oh btw i am still pretty new at ruby (3 months experience with
ruby and rails).
thanks
stuart
_______________________________________________
Xmpp4r-devel mailing list
[email protected]
https://mail.gna.org/listinfo/xmpp4r-devel