This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function converseAutoJoinChatPlugin( converse ) { | |
var jids = [ '[email protected]' ]; | |
converse.on('ready', function() { | |
var _transform = function (jid) { | |
var chatbox = converse.chatboxes.get(jid); | |
if (!chatbox) { | |
var roster_item = converse.roster.get(jid); | |
if (roster_item === undefined) { | |
// Assume MUC | |
converse.chatboxes.create({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bind on click event on page startup using converse's jQuery | |
converse.env.jQuery(function($) { | |
$('#join-button').on('click', function() { | |
converse.rooms.open('[email protected]'); | |
}); | |
}); | |
converse.initialize({ | |
.... |