Mercurial > prosody-modules
diff mod_admin_web/admin_web/www_files/js/main.js @ 292:a9e69088e678
mod_adhoc_web: Put pubsubHost into js from lua. Compat with util.pubsub changes
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Thu, 23 Dec 2010 21:16:31 +0100 |
parents | 9233d7ee3c09 |
children | 5a619d6045a8 |
line wrap: on
line diff
--- a/mod_admin_web/admin_web/www_files/js/main.js Thu Dec 23 20:00:34 2010 +0100 +++ b/mod_admin_web/admin_web/www_files/js/main.js Thu Dec 23 21:16:31 2010 +0100 @@ -8,7 +8,7 @@ var localJID = null; var connection = null; -var pubsubHost = null; /* TODO: Replace this inside Lua */ +var pubsubHost = '%PUBSUBHOST%'; function log(msg) { var entry = $('<div></div>').append(document.createTextNode(msg)); @@ -62,7 +62,6 @@ } else if (status == Strophe.Status.CONNECTED) { log('Strophe is connected.'); showDisconnect(); - pubsubHost = 'pubsub.' + connection.domain; connection.send($iq({to: pubsubHost, type: 'set', id: connection.getUniqueId()}).c('pubsub', {xmlns: Strophe.NS.PUBSUB}) .c('subscribe', {node: Strophe.NS.S2SPUBSUB, jid: connection.jid})); connection.addHandler(_cbNewS2S, Strophe.NS.PUBSUB + '#event', 'message');