maxpowel/jQuery-XMPP-plugin — Issue #1: Resource does not set
Author: daniel-yavorovich
Created: 2012-01-13 04:42:18+00:00
State: open

Hello!

I have problem with using 'resource' parametr.
I have been used for this settings:

$.xmpp.connect({jid:"{{ jabber_id }}", password:"{{ jabber_pass }}", resource:"{{ first_name }}_{{ last_name }}", url:"{{ http_bind }}",
onDisconnect:function() {
$.xmpp.setPresence("offline");
},
onConnect: function() {
document.getElementById("messages_block").innerHTML = "{{ first_name }} {{ last_name }}, Вы вошли в чат. Пожалуйста, опишите свой вопрос.
";
$.xmpp.setPresence(null);
},
onIq: function(iq){
console.log("onIq");
},
onMessage: function(message){
addElement("touser", "Admin: " + message.body);
},
onPresence: function(presence){
console.log("New presence of " + presence.from + " is " + presence.show);
}
});

But messages from JS-client delivered from resource "undefined".

I'm doing something wrong, or is it a bug in the code?

Thanks.

---
Best regards,
Daniel Yavorovich

P.S.
Sorry for my lousy English.