strophe

Strophe sending double request on page unload

断了今生、忘了曾经 提交于 2019-12-21 19:30:13
问题 I have written an XMPP client with jQuery+Strophe. It all works well (1-on-1, presence, MUC, etc) and is contained within a jQuery-plugin. However, when the page unloads, it sends 2 final requests with the same rid. It only recently became a problem when I started working on session attachment. Here is an example of the Firebug console: Here, I just logged in and immediately refreshed the page. The first post you see is the initial presence stanza after the login. After that request, a new

Save received files from xmpp Strophe si-filetransfer

倾然丶 夕夏残阳落幕 提交于 2019-12-20 02:32:50
问题 I am implementing file transfer in my web application using strophe.si-filetransfer.js plugin. I am able to receive file details within an iq stanza. My question is, How can I extract file data from an iq stanza and download it? The link I referred to work around: https://github.com/strophe/strophejs-plugins/tree/master/ibb Thanks 回答1: On the receiver side, you need to collect file info on fileHandler function, then grab all data chuncks on ibbHandler (e.g. using an array) and finally you

XMPP file transfer using Strophe library

喜夏-厌秋 提交于 2019-12-19 23:25:23
问题 Can anyone let me know the implementation of file transfer in XMPP using strophe library 回答1: I would recommand to use the XEP-0065: SOCKS5 Bytestreams that you will need to code by yourself, I'm afraid... 回答2: theres a strophe si-filetransfer plugin available. You will have to study the code and add the handler along the lines of: connection.si_filetransfer.(addhandler); Then use it with : connection.si_filetransfer.send(to, sid, filename, size, mime, cb); I tried it out earlier, but was

What do I need for integrating XMPP into Rails?

烈酒焚心 提交于 2019-12-18 17:13:32
问题 Here's what I have so far. XMPP Server - Ejabberd or Vine XMPP Library in Rails - Blather XMPP Library on Client - Strophe.js Is this what I need to integrate chat into my rails app? EDIT: from the creator of Vine. "It's probably safer to use ejabberd, since its a more full-featured server than vines." 回答1: I would have add a comment but unfortunately I don't have enough reputation yet. If you want to do your chat client side, Strophe is recommended. If you want to store some conversations,

Strophe register plugin

荒凉一梦 提交于 2019-12-17 19:56:14
问题 I am trying to use this https://github.com/strophe/strophejs-plugins/tree/master/register for my small app http://rghost.ru/7qjXH2cTZ and a always get Strophe.status = 1? what does it mean? It should be 11 for enter into If for register new user 回答1: You can verify your code against my example on Plunker: http://plnkr.co/edit/F8cbsBZQUPiZ0W1v0O89 Here is the code part related to user registration: function register() { var registerCallback = function (status) { if (status === Strophe.Status

Error Creating Chat Room StropheJS with ejabberd

喜欢而已 提交于 2019-12-14 03:44:36
问题 I am trying to create a chat room using StropheJS My Code: var presence = $pres({ to: "testRoom@conference@localhost/yashwanth, from: Strophe.getBareJidFromJid(connection.jid) }); Groupie.connection.send( presence.tree()); Groupie.connection.muc.createInstantRoom("testRoom@conference.localhost/yashwanth", function(status) { console.log("Room Created Successfully", status); }, function(status) { console.log("Error Creating Room", status); }); While creating the room I am facing the below error

Integrating Facebook Chat

烂漫一生 提交于 2019-12-13 18:19:18
问题 I have been asked to integrate Facebook Chat to my application using JavaScript only. I cannot use X Facebook platform authentication as it needs a domain URL. So my option is to set up an XMPP chat client using strophe.js via a digest MD5 SASL mechanism. Regarding BOSH connect manager, http://bosh.metajack.im:5280/xmpp-httpbind. Is this enough or should I configure it in my server? I am using the Tomcat server. 回答1: Facebook does not do S2S federation, only C2S, so you will have to use that

Strophe XMPP using Angular 2

荒凉一梦 提交于 2019-12-13 15:39:11
问题 I want to create service for Strophe.JS XMPP library in angular2 project. That service is responsible for Open and Close connection and include handler to receive message. I am able to do in .Net MVC project but i did not found a way to implement in Angular2 framework. Thanks, Sanjeev 回答1: First to install @types/strophe npm install --save @types/strophe Second to download Strophe library from Strophe Site Then, You should put the framework inside /src/assets/ Then, You should add the script

ejabberd stateless configuration

怎甘沉沦 提交于 2019-12-12 03:46:59
问题 I'm really new to XMPP and I decided to go with ejabberd. Firstly I tried to configure it on ubuntu, but I got error after error and I just switched to windows. The server is running now. I've installed XAMPP and I tested the connection with strophe.js. I've read some of the documentation on ejabberd and watched the tutorial videos and that guy talks about stateless configuration( use ejabberd only of messages and have my own database in which I save messages,users etc). I want to achieve

Keep RID in sync with multiple tabs for Strophe js connection

◇◆丶佛笑我妖孽 提交于 2019-12-12 02:24:34
问题 We are trying to implement a chat application where we are using strophe js for http-bind. Everything works fine, the only problem we are facing is with keeping connection alive with multiple tabs. I am not getting how to keep RID in sync when multiple tabs are open. Please help!! 回答1: Each requesting resource should have it's own resource name. In your instance, each tab should have it's own resource name and connection. username@jabber.servername.com/tab1 username@jabber.servername.com/tab2