문제

Im looking for a solid and working XMPP gem for rails 3.2

There are hundreds of them in the net, but most of them outdated or alpha.

Can you recommend me one for rails 3.2?

도움이 되었습니까?

해결책

The gem xmpp4r works fine. (https://github.com/ln/xmpp4r)

Here is an example:

require 'xmpp4r'

sender_jid = Jabber::JID.new('a@b.com')
client = Jabber::Client.new(sender_jid)
client.connect('talk.google.com')
client.auth('password')

client.send(Jabber::Presence.new.set_show(:chat)).set_status('my status')

receiver_jid = Jabber::JID.new("dest@domain.com")
message = Jabber::Message::new(receiver_jid, "Testing").set_type(:normal).set_id('1')
client.send(message)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top