xmpp4r

XMPP transport to ICQ

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 07:04:55
问题 I try to send messages to icq via jabber-transport. I tried to use code from this answer XMPP transport to another protocol, but I got this message: DEBUG -- : SENDING: <message to='12345@icq.jabber.blahblah.ru' xmlns='jabber:client'><body>test message from robot</body></message> => nil DEBUG -- : RECEIVED: <message from='12345@icq.jabber.blahblah.ru' to='myjit@blahblah.ru/83076 14161416233482839674' type='error'><error code='401' type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp

Using Ruby, how can I confirm that an XML snippit is valid?

爱⌒轻易说出口 提交于 2019-12-23 22:40:46
问题 As some of you make know, I'm working on XMPP (Jabber) integration for the StackOverflow chat system, as an XMPP component written in Ruby using the xmpp4r package. I'm struggling with one issue (well, many issues, but one issue at the moment :-) I am taking the JSON feed from the chat and extracting the HTML for the messages. I am using The Ruby TidyHTML bindings to convert the HTML from the JSON fed to XHTML, so that I can send it as an XMPP message -- since XMPP messages are just XML,

xmpp4r and Iq.new_register for in-band registration

人盡茶涼 提交于 2019-12-23 02:59:13
问题 I've been having trouble using xmpp4r to do in-band registration following the SO thread here: XMPP transport to another protocol The problem comes down to that I get a NoMethodError Exception error for new_register when I run the following code: require "xmpp4r" require "xmpp4r/client" require "xmpp4r/iq" def in_band_reg chat_name = 'testChatName' password = 'pword' reg = Jabber::Iq.new_register(chat_name, password) end NoMethodError Exception: undefined method `new_register' for Jabber::Iq

XMPP transport to another protocol

强颜欢笑 提交于 2019-12-20 06:43:02
问题 I would like to add support of ICQ in my application using jabber-transport. I use xmpp4r ruby's library. All that I found doesn't show how to login to external (icq) server and how to send messages. Can you show example of code or text explanation how to do so? (may be not using xmpp4r and ruby, I only need a hint.) 回答1: I found solution thanks to canhaschat plugin source code require 'xmpp4r' #connect to jabber jid=Jabber::JID.new "your_jid" client=Jabber::Client.new jid client.connect

Not able to send facebook message using xmpp4r_facebook

落花浮王杯 提交于 2019-12-11 04:38:21
问题 I am following the instructions presented in http://dalibornasevic.com/posts/35-how-to-send-private-messages-with-facebook-api to send message to my friend and currently testing from command line. Following is the code I am using. When I open my facebook account and check the sent messages I don't see the message I am trying to send through command line. I just don't understand the mistake I am making. 1.9.3-p194 :017 > require 'xmpp4r_facebook' => true 1.9.3-p194 :00 3 > id = '-<my facebook

How can I send an image on the web in an XMPP (Jabber) message?

别等时光非礼了梦想. 提交于 2019-12-04 18:15:35
问题 For the XMPP interface for the Stack Overflow chat, I am currently taking the HTML of the chat messages and converting to valid XML, and setting that as the html child element of the XMPP message object. In my Mac OS X jabber client this was working great! It meant that when users in the SO chat posted a oneboxed image, the image would show up in my XMPP client (Adium for OS X): However I just updated Adium to the latest version and apparently they considered what I was doing to be a security

How can I send an image on the web in an XMPP (Jabber) message?

妖精的绣舞 提交于 2019-12-03 12:00:30
For the XMPP interface for the Stack Overflow chat , I am currently taking the HTML of the chat messages and converting to valid XML , and setting that as the html child element of the XMPP message object. In my Mac OS X jabber client this was working great! It meant that when users in the SO chat posted a oneboxed image, the image would show up in my XMPP client (Adium for OS X): However I just updated Adium to the latest version and apparently they considered what I was doing to be a security hole and against XMPP specs, and changed that behavior . Their reasoning was that XMPP should not

XMPP transport to another protocol

社会主义新天地 提交于 2019-12-02 11:24:22
I would like to add support of ICQ in my application using jabber-transport. I use xmpp4r ruby's library. All that I found doesn't show how to login to external (icq) server and how to send messages. Can you show example of code or text explanation how to do so? (may be not using xmpp4r and ruby, I only need a hint.) I found solution thanks to canhaschat plugin source code require 'xmpp4r' #connect to jabber jid=Jabber::JID.new "your_jid" client=Jabber::Client.new jid client.connect client.auth "your_jabber_password" #connect to transport reg=Jabber::Iq.new_register "your_login (e.g 123456789)

iOS XMPP framework get all registered users

爷,独闯天下 提交于 2019-11-27 03:00:12
问题 In my chat application I want to get all online registered users. So everybody and not only people in my roster which is achieved with this code: - (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence { // a buddy went offline/online NSString *presenceType = [presence type]; // online/offline NSString *myUsername = [[sender myJID] user]; NSString *presenceFromUser = [[presence from] user]; if (![presenceFromUser isEqualToString:myUsername]) { if ([presenceType