strophe

XMPP: AngularJS + Strophe

可紊 提交于 2019-12-11 20:13:56
问题 The basic XMPP with strophe and javascript wants to convert to AngularJS. .controller('loginCtrl', function(xmppAuth) { xmppAuth.auth(login, password); }) and in service: .service('xmppAuth', function() { .return { auth: function(login, password) { connect = new Strophe.Connection(domain); connect.connect(login, password, function (status) { if (status === Strophe.Status.CONNECTED) { connect.addHandler(on_roster_changed,"jabber:iq:roster", "iq", "set"); connect.addHandler(on_iq, null, "iq",""

Openfire in-band-registration via Bosh not working with Strophe/Strophe.register.js

南楼画角 提交于 2019-12-11 19:53:26
问题 I previously asked a similar question about ejabberd, however ejabberd was giving other problems, so I switched to openfire. For the sake of not making the original qestion to cluttered, I decided to create a new question, since this question pertains to openfire and is a different issue than the one I was having with ejabberd. So, here goes the question: I have a strophe.js xmpp client, which connects to an openfire 3.10.0 alpha server running on the Amazon cloud. I need 3.10.0 alpha over 3

Register XMPP-Account using the Strophe.js-Register-Plugin

若如初见. 提交于 2019-12-11 14:07:12
问题 I try to register a xmpp-account using the strophe-register-plugin (https://github.com/metajack/strophejs-plugins/tree/master/register). It works fine with the connection manager from example "http://bosh.metajack.im:5280/xmpp-httpbind" but I can't register the account using the OpenFire connection manager. (Normal login works with both connection managers...) Connection State Changes are 1 -> 10, thats it. 1 means "connecting" but i dont know what 10 means... var connection = new Strophe

XMPP Multiple tabs synchronize sent message

守給你的承諾、 提交于 2019-12-11 06:43:30
问题 I am implementing an Openfire chat client in a web site with Strophe.js. I managed to get multiple sessions and multiple windows reloading page and reconnecting back. Now I have challenge in restoring the chat history. But the first issue I am stuck at when a user opens two tabs of our site it creates two xmpp sessions with different resource ID's but now say a@example.com/tab1 sent a message to friend this should be synchronized in tab2 Example if you send chat message from gtalk user sent

Xmpp, Strophe Js : Multiple active connections for same user

主宰稳场 提交于 2019-12-11 06:19:16
问题 I have implemented web chat using xmpp + openfire + strophe. On the same openfire and xmpp server we have developed IOS chat as well. I am facing below problem. Lets say a user A connected in xmpp in IOS app and user A chat with user B. Now same user A connect with web chat to xmpp using strophe and user B sends the message to user A then User A will have message in the web chat connection only. Now user A connect with xmpp in IOS and User B send message then User A will get message in IOS

How to create persistent rooms in openfire using strophe?

夙愿已清 提交于 2019-12-11 00:53:23
问题 I'm using the following iq message to create persistent rooms in openfire: var configiq = $iq({ to : chatObj.getActiveChatRoomName() + "@" + chatObj.groupChatService, type : "set" }).c("x", { xmlns : "jabber:x:data", type : "submit" }).c('field', { "var" : "FORM_TYPE" }) .c('value').t("http://jabber.org/protocol/muc#roomconfig") .up().up() .c('field', { "var" : "muc#roomconfig_persistentroom" }) .c('value').t("1"); chatObj.connection.sendIQ(configiq.tree(), function () { console.log('success'

reset the XMPP connection if the page gets refreshed

隐身守侯 提交于 2019-12-10 23:04:44
问题 I am trying to create a strophe connection with XMPP using javascript with my ejabberd server , i am able to make a connection when the page loads and able to disconnect when the disconnect button is clicked. now the problem is , the connection is alive and if a user accidently refresh the page , then my javascript is trying to make the connect again , and in response to that i am getting. (its just because the previous connection might be still alive ) <body xmlns='http://jabber.org/protocol

strophe.js with http-bind failed to load resource 404 not found

时光总嘲笑我的痴心妄想 提交于 2019-12-10 20:05:39
问题 I am trying to connect with ejabberd server using strophe.js, but I got the following error: POST http://localhost/http-bind/ 404 (Not Found) Strophe.Bosh._processRequest.sendFunc @ strophe.js:4614 Strophe.Bosh._processRequest @ strophe.js:4626 Strophe.Bosh._throttledRequestHandler @ strophe.js:4778 Strophe.Bosh._connect @ strophe.js:4177Strophe.Connection.connect @ strophe.js:2335 $scope.login @ app.js:162 fn @ VM165:4 Ic.(anonymous function).compile.d.on.f @ angular.js:23411 $get.n.$eval @

404 Invalid SID value in Strophe while using attach()

倾然丶 夕夏残阳落幕 提交于 2019-12-10 15:25:30
问题 I attempted to find an answer to my question with the search engine but i was unable to. I'm using strophe.muc.js in my backboen project in order to make it real time website. And now i am trying to attach a Session, so that if a page get reloaded, no new connection get created. function Chat(){ var self = this; this.connection = false; this.jid = false; this.BOSH_SERVICE = 'http://183.155.10.55:7070/http-bind/'; this.init = function () { self.connection = new Strophe.Connection(this.BOSH

Strophe character encoding issue

大城市里の小女人 提交于 2019-12-10 04:06:56
问题 I am working on an XMPP client and having an issue with messages being sent/received by Strophe (javascript version). The issue is messages that contain "special" characters. For instance, if I send: I'm here. An external client (i.e. iChat) will display I&ampapos;m here. A strophe client doesn't display anything at all. If I send that same message from iChat to the strophe client, it displays properly. Here is the most basic sample code I could come up with: <html> <head> <script type='text