Add initial functionality for transmitting user presence status changes.

This commit is contained in:
JC Brand 2012-06-20 22:08:21 +02:00
parent ce4528b6f5
commit 6ab9ddc055

View File

@ -325,6 +325,10 @@ $(document).bind('jarnxmpp.message', function (event) {
xmppchat.receiveMessage(event);
});
$(document).bind('xmppchat.send_presence', function (event, jid, type) {
jarnxmpp.connection.send($pres({'type':type}));
});
$(document).bind('jarnxmpp.connected', function() {
var chatdata = jQuery('span#babble-client-chatdata'),
cookie = jQuery.cookie('chats-open-'+chatdata.attr('username')),
@ -357,4 +361,8 @@ $(document).bind('jarnxmpp.connected', function() {
$(document).ready(function () {
$('ul.tabs').tabs('div.panes > div');
$('select#select-xmpp-status').bind('change', function (event) {
var jid = jarnxmpp.connection.jid;
$(document).trigger('xmppchat.send_presence', [jid, event.target.value]);
});
});