Skip to content

Instantly share code, notes, and snippets.

View gowthaman-murugan's full-sized avatar
🏠
Working from home

Gowthaman Murugan gowthaman-murugan

🏠
Working from home
View GitHub Profile
@knixeur
knixeur / converse.autojoin.js
Last active August 29, 2015 14:14
A simple plugin that let's you open chats or join rooms when converse is initialized
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({