xmpp-web icon indicating copy to clipboard operation
xmpp-web copied to clipboard

Room listing lobby for logged in users same as guest

Open singpolyma opened this issue 2 years ago • 5 comments
trafficstars

Describe the solution you'd like

It would be nice if, just like guests, logged in users could be taken to a grid of rooms in a configured MUC service. There is now the "public rooms" but that is on their server, not my configured defaultMuc and it's in a compact table not the nice grid.

singpolyma avatar Jan 31 '23 02:01 singpolyma

but that is on their server, not my configured defaultMuc

I'm not sure to understand your use case, you set a defaultMuc which is not on your server? And it works? 😆

nioc avatar Feb 01 '23 22:02 nioc

This is related to my request #84 I'd like to get that lobby view that guest sees right now, I'd like it to list MUCs based on a setting instead of based on what server the user or anon happens to be on, and I'd like it to work for registered users and guests both.

Does that sufficiently summarize the pieces?

singpolyma avatar Feb 01 '23 22:02 singpolyma

If you can send me a prosody.cfg.lua example file which run in the staging env, it could help me to understand better 😉

nioc avatar Feb 06 '23 00:02 nioc

It would be the same no matter what server or server config. The whole point is it shouldn't matter how the server is configured.

singpolyma avatar Feb 06 '23 01:02 singpolyma

Both guest and registered use the same this.$xmpp.getPublicMuc() function. This function request an iq disco#items to find the MUC services on the host:

  • defined by anonymousHost for guest, example: anon.localhost,
  • found in the domain part of your username or, if not set (logged with just the local part), defined in defaultDomain for registered, example: localhost.

With the following prosody.cfg.lua:

VirtualHost "localhost"
    name = "XMPP server"
    enabled = true
    -- notice that there is no disco_items as components are subdomains of virtual host

VirtualHost "anon.localhost"
    authentication = "anonymous"
    disco_items = {
        { "upload.localhost", "File upload" };
        { "anon-conference.localhost", "Multi users chat" };
}

Component "conference.localhost" "muc"
    modules_enabled = {
        "muc_mam";
        "vcard_muc";
    }
    name = "Private conferences server"
    restrict_room_creation = "local"
    max_history_messages = 50

Component "anon-conference.localhost" "muc"
    modules_enabled = {
        "muc_mam";
        "vcard_muc";
    }
    name = "Conferences server"
    restrict_room_creation = "local"
    max_history_messages = 50

We got the public rooms of the 2 MUC (conference.localhost and anon-conference.localhost) for registered users: image

And guests, only see the public rooms of the advertised MUC (anon-conference.localhost): image

So, YES, server-side configuration matters.

If your request is only UI related, please do not mention the configuration, and just say "It would be nice if, just like guests, logged in users could be taken to a grid of rooms. There is now the "public rooms" but it's in a compact table not the nice grid."

The guest grid was made after the registered table, they were not designed for the same type of use and integration (registered have the sidebar and navbar). I have to think how the grid could fit to the reduced space without losing room attributes information.

nioc avatar Feb 13 '23 00:02 nioc