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.

Open only active group chat per page

See original GitHub issue

I use converse to allow users to chat around different topics, in this example topics are Session1 and Session2, they reside on different urls, so I want each of this groups to open chat for it’s own subject.

I initialize converse.js with:

 converse.initialize({
        authentication: 'prebind',
        keepalive: true,
        hide_muc_server: true,
        bosh_service_url: 'http://localhost:7070/http-bind/',
        show_controlbox_by_default: false,
        jid: 'name2@openfire/foo',
        sid: '28gc8z6c31',
        rid: '5596002988',
        auto_join_rooms: [{jid: 'Session1@conference.openfire', nick: 'name2'}]
    });

On some other page I do it with same data, but auto_join_rooms: [{jid: 'Session2@conference.openfire', nick: 'name2'}].

The problem is that on this page, I don’t want chat for room Session1 to be opened, just Session2. So only one chat window at a time, but they seem to be adding up as I browse the site, joining one by one. Can I limit joining to only one room? Or leave other rooms somehow once I join new group.

@jcbrand How can I control that?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jcbrandcommented, Apr 29, 2017

@umpirsky Take a look at the converse-singleton.js non-core plugin I added recently.

It makes sure that only one chat is visible at any one time. I use it for the converse-mobile.js build and whitelist it in mobile.html.

0reactions
umpirskycommented, Mar 15, 2017

@jcbrand I did deeper testing and I can confirm that converse.js is doing some unexpected actions.

What I do is:

After first page load I see this in openfire admin:

screenshot from 2017-03-15 17-57-48 screenshot from 2017-03-15 17-58-03 screenshot from 2017-03-15 17-58-15

Then, if I refresh the page, chat room is changed and user is promoted to moderator, this is done through converse.js, because when I remove js, it does not happen, here is how it looks:

screenshot from 2017-03-15 17-58-33 screenshot from 2017-03-15 17-58-43 screenshot from 2017-03-15 17-58-55

What I want to do is to be able to control what chats will be active, and with ths behavior, I cannot remove moderator from room, and cannot deactivate rooms based on what page I am on.

Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Group chats | Messenger Help Center - Facebook
Start a group chat on Messenger​​ Select or type the name of each person. Type your message and tap . Learn how to...
Read more >
Customize the Group Chat windows layout - Microsoft Support
In My Chat, click a group chat room to select it, and then press CTRL+D. · Click the Open in New Window button....
Read more >
Geneva | This is where your group chats
Geneva is a free messaging app for groups and clubs. Stay more connected and organized with chat, events, video, and more...
Read more >
About spaces and group conversations - Google Chat Help
Off: Messages are removed after 24 hours. Spaces grouped by topic: History is on by default and can't be turned off. Tip: You...
Read more >
How to Create Group Chat on Facebook Messenger - YouTube
This video shows you how to make a Facebook Messenger group chat on your iPhone, iPad, or Android device.See more videos by Max...
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