comparison mod_admin_web/admin_web/www_files/js/main.js @ 297:a70284e01453

mod_admin_web: Add support for calling adhoc commands
author Florian Zeitz <florob@babelmonkeys.de>
date Sun, 26 Dec 2010 02:20:25 +0100
parents 5a619d6045a8
children b241c79a0eb7
comparison
equal deleted inserted replaced
296:d49702971a5e 297:a70284e01453
60 connection.disconnect(); 60 connection.disconnect();
61 } 61 }
62 } else if (status == Strophe.Status.CONNECTED) { 62 } else if (status == Strophe.Status.CONNECTED) {
63 log('Strophe is connected.'); 63 log('Strophe is connected.');
64 showDisconnect(); 64 showDisconnect();
65 Adhoc.checkFeatures('#adhoc', connection.domain);
65 connection.send($iq({to: pubsubHost, type: 'set', id: connection.getUniqueId()}).c('pubsub', {xmlns: Strophe.NS.PUBSUB}) 66 connection.send($iq({to: pubsubHost, type: 'set', id: connection.getUniqueId()}).c('pubsub', {xmlns: Strophe.NS.PUBSUB})
66 .c('subscribe', {node: Strophe.NS.S2SPUBSUB, jid: connection.jid})); 67 .c('subscribe', {node: Strophe.NS.S2SPUBSUB, jid: connection.jid}));
67 connection.addHandler(_cbNewS2S, Strophe.NS.PUBSUB + '#event', 'message'); 68 connection.addHandler(_cbNewS2S, Strophe.NS.PUBSUB + '#event', 'message');
68 connection.sendIQ($iq({to: pubsubHost, type: 'get', id: connection.getUniqueId()}).c('pubsub', {xmlns: Strophe.NS.PUBSUB}) 69 connection.sendIQ($iq({to: pubsubHost, type: 'get', id: connection.getUniqueId()}).c('pubsub', {xmlns: Strophe.NS.PUBSUB})
69 .c('items', {node: Strophe.NS.S2SPUBSUB}), _cbNewS2S); 70 .c('items', {node: Strophe.NS.S2SPUBSUB}), _cbNewS2S);