Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open the newly created room after user login success #3297

Open
udaysv opened this issue Dec 26, 2023 · 2 comments
Open

Unable to open the newly created room after user login success #3297

udaysv opened this issue Dec 26, 2023 · 2 comments
Labels
Milestone

Comments

@udaysv
Copy link

udaysv commented Dec 26, 2023

Describe the bug

After successfully logging into the app, the admin user(Other user) creates a new room and adds the logged-in user as a participant to this room. Subsequently, when this logged-in user attempts to open a room using the JID and password, they encounter difficulty and are unable to access the room UI.

let converseSettingsObj = {
        bosh_service_url: boshUrl,
       
        credentials_url: {
            jid: getUserJID(),
            password: getToken()
        },
        jid: getUserJID(),
        password: getToken(),
        auto_login: true,
        authentication: "login",
        keepalive: true,
        allow_logout: true,
        auto_list_rooms: false,
        theme: "concord",
        auto_reconnect: true,
        play_sounds: true,
        sounds_path: `/sounds/`,
        notification_icon: '/logo/',
        view_mode: "embedded",
        singleton: false,
        show_tab_notifications: true,
        discover_connection_methods: false,
        auto_register_muc_nickname: true,
        notify_all_room_messages: true,
        auto_subscribe: true,
        allow_contact_requests: true,
        locked_domain: xmppDomain,
        muc_domain: xmppMUCDomain,
        allowed_image_domains: xmppImageDomains,
        allowed_audio_domains: xmppAudioDomains,
        allowed_video_domains: xmppVideoDomains,
        locked_muc_domain: true,
        show_controlbox_by_default: false,
        clear_cache_on_logout: true,
        allow_user_trust_override: "off",
        allow_message_styling: true,
        stanza_timeout: 90000,
        csi_waiting_time: 3,
        auto_away: 3,
        auto_xa: 6,
        show_message_avatar: false,
        time_format: "hh:mm A",
        allow_non_roster_messaging: true,
        idle_presence_timeout: 900,
        reuse_scram_keys: true,
        visible_toolbar_buttons: {
            call: false,
            spoiler: false,
            emoji: true,
            toggle_occupants: false,
        },
        whitelisted_plugins: ["main_plugin"],
        blacklisted_plugins: ['converse-vcard', 'converse-notification'],
    
    }
const roomJID = `${data.room_id}@${xmppMUCDomain}`;
const nick = "xxxx";
const password = "xxxxx";
_converse.api.rooms.open(roomJID,
    {
        nick: nick,
        id: roomJID,
        jid: roomJID, 
        password: password,
    }, true);

To Reproduce
Steps to reproduce the behavior:

  1. Create a React JS project and add CDN Links of converse js 10.1.4.
  2. Create a login for the user and after login success initialize the converse window object.
  3. After Converse JS is ready. an Admin user(Other user) will add this user to the room.
  4. If this login user tries to open this circle. The room is not opening.

Environment (please complete the following information):

  • Browser - Chrome, Firefox, Edge
  • Converse.js version : 10.1.4

Additional context
When I tried to get the room object.

let model = await _converse.api.chatboxes.get(roomJID);

It is returning null for that room.

@jcbrand
Copy link
Member

jcbrand commented Jan 4, 2024

Thanks for the bug report.

they encounter difficulty and are unable to access the room UI

This is unfortunately too vague to know what's going on. Please check the browser's developer console for errors.

It's also a good idea to set loglevel to 'debug' in your converseSettingsObj so that you can see the XML stanza traffic when trying to enter the MUC.

@udaysv
Copy link
Author

udaysv commented Jan 4, 2024

@jcbrand
I have kept logs. But there is no errors in browser console. It is opening previous room UI.

My Observation: If I call rooms.open for new room. It is directly calling with previously opened room jid instead of new room

chat room view is initilizing with previously opened jid.

converse.api.listen.on('chatRoomViewInitialized', (view: any) => {
             console.log("custom plugin chatRoomViewInitialized", "fire", view);
 });
log2 log_1 conversejs_add

@jcbrand jcbrand modified the milestone: 11.0.0 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants