question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Persistent muc room creation not working

See original GitHub issue

I am trying to use the converse.js developer API to create a persistent multi-user chatroom. The room is created, but in the UI under ‘features’, the room is listed as Temporary.

I am using converse.js from the conversejs.org CDN:

<script src="https://cdn.conversejs.org/dist/converse.min.js"></script>

My code is as follows:

<script>
converse.plugins.add('larc-join-room', {
    initialize: function () {
    	var _converse = this._converse;
    	console.log(_converse);
    	_converse.on('connected', function (event) { 
  			var nick = $('#username').val().replace(" ", "").toLowerCase() + $('#user_id').val();
        	var roomname = $('#selected-document').val().replace(" ", "").toLowerCase() + '@conference.servername.co.uk'
        	var create_if_not_found = true;
        	_converse.api.rooms.open(
            roomname,
            {'nick': nick, 'auto_configure': true, 'roomconfig': {'persistentroom': true}}, false);
		});
    }
});

converse.initialize({
  bosh_service_url: 'https://servername/http-bind/',
  keepalive: true,
  debug: true,
  authentication: 'prebind',
  jid: $('#jabber_id').val(),
  prebind_url: 'https://servername/larc/get_bosh_data',
  show_controlbox_by_default: true,
  whitelisted_plugins: ['larc-join-room'],
  blacklisted_plugins: [
                'converse-dragresize',
                'converse-minimize',
                'converse-vcard'
            ]
});
</script>

Can you help me to fix this issue? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
notnow123commented, Apr 14, 2017

@jcbrand I can confirm that the fix works. roomconfig is now respected in MUC rooms created through the API.

0reactions
jcbrandcommented, Apr 13, 2017

@notnow123 I’ve committed a fix. Please check if it now works for you.

You won’t be able to use the CDN to test the fix. Instead you’ll have to clone this repo and then run make dist to generate a converse.min.js file which you can use.

You can still use the CDN CSS file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem creating Persistent MUC with ReST API - Ejabberd
The room is not persisted. Yet, when I create a persistent room using converse.js XMPP client, the room is getting saved in the...
Read more >
Why mysql table "muc_room" stores not persistent room?
Questions: 1) Why are not persistent room created with ejabberd API stored in muc_room table (maybe some bug)? 2) How to avoid recreating...
Read more >
Unable to create persistent room with Smack 4.2.4
Hi Team, I am unable to create a persistent room with below code snippet. String groupServiceName = “goupName@conference.domainName”;
Read more >
Auto-created, persistent rooms in MUC - Google Groups
Rooms are temporary by default, and are deleted when the last participant leaves. A room owner can use the room configuration dialog to...
Read more >
mod_muc - Prosody IM
Multi-user chat (MUC) is Prosody's module for allowing you to create ... This does not directly affect how many messages are send when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found