prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
25 stars 2 forks source link

Feature Request: Display Channel Information on Join Confirmation using Disco#info #140

Open jinyu2022 opened 2 months ago

jinyu2022 commented 2 months ago

Currently, when a user selects a channel to join, there's no display of basic channel information before the final join action. This could lead to users accidentally joining incorrect channels. To mitigate this, we propose displaying relevant channel information retrieved using an IQ stanza with the disco#info protocol during the join confirmation process.

jinyu2022 commented 2 months ago

Gajim, a popular XMPP client, already implements a similar feature for displaying channel information before joining. Its implementation can serve as a reference for designing and implementing the proposed feature in this project. image

valeriansaliou commented 2 months ago

That sounds like a good idea yes. @nesium wdyt?

nesium commented 2 months ago

I think that it makes perfect sense for a general-purpose XMPP client. In my opinion for a workspace-focussed client this seems overly technical.

Currently we have the notion of:

Generally any room created with the Prose backend should be:

For the different types of rooms mentioned above, we're showing different icons. So we're giving certain guarantees for a room when you see the respective icon and you could say that we're condensing the list pictured above from Gajim into a single icon. I would like our users to think in those terms since this is something they might know from other workspace chats.

Obviously federation is a different beast and we should probably give a warning when joining a room outside of the user's home server, but I would very much like to have a non-XMPP lingo for that. We might give them a general warning since they could be at risk leaking company secrets. For users that are not well-versed in XMPP, "Open", "Semi Anonymous", "Not Moderated", "Hidden", "Temporary" and "Archiving" might sound fairly cryptic.

jinyu2022 commented 2 months ago

I understand your concerns, but I believe that even workspace-focused clients should provide some basic channel information to prevent users from mistakenly joining incorrect channels, especially external ones. We can achieve this with a user-friendly interface that leverages the information returned by disco#info without overwhelming users with technical details. For rooms that meet the standard Prose configuration, we can clearly label them as "Prose Public Channel" or "Prose Private Channel". For rooms that deviate from the standard, we can display a unique icon to indicate exceptions and use concise, non-technical language to explain the specific differences. For example:

To avoid cluttering the interface, we can initially display only the icon, the basic channel category (e.g., "External Room" / "Private Channels"), and any relevant warnings. Users can then click on the icon or a designated area to reveal more detailed information about the room's specific properties.

This approach allows us to maintain a clean and user-friendly interface while still providing users with the necessary information to make informed decisions about joining different types of rooms, ultimately promoting security awareness and preventing accidental entries.

nesium commented 2 months ago

Thanks, @jinyu2022. That sounds quite good.

Just want to add that I believe it's important that "standard" rooms can be joined without any intermediate step, as it is the case right now.

Or similar to how Slack (I believe) does this, where you can "peek" at a room. I.e. see the last messages of a room as if you had joined already, just with an overlay that includes the additional information/warning. It would feel less intrusive and less like an additional step. Although in that case you'd probably leak your real JID in non-anonymous rooms, not sure ATM if/how MAM works if you've not joined a room.

poVoq commented 2 months ago

I believe ConverseJS has a feature where you can see the last messages of a channel without joining it yet, similar to Slack. There is some sort of standard to do that, but I forgot the XEP.

jinyu2022 commented 2 months ago

We can leverage the existing channel verification step to seamlessly integrate room type information for standard rooms. Currently, when a user attempts to join a channel, the client verifies its existence and displays "The channel xxx already exists. You will join it." We can enhance this message by incorporating the room type directly.

For example, if the channel meets the default Prose configuration, the message could become "The channel xxx already exists. You will join this Public Prose Channel/Private Prose Channel." This informs users about the room type without introducing any extra steps or delays.

For non-standard rooms, we can then proceed with the proposed approach of displaying a warning icon or more detailed information as needed. This ensures that users are alerted to potential differences and can make informed decisions before joining, while keeping the experience seamless for standard rooms.

jinyu2022 commented 2 months ago

I believe ConverseJS has a feature where you can see the last messages of a channel without joining it yet, similar to Slack. There is some sort of standard to do that, but I forgot the XEP.

XEP-0437 provides room activity indicators, but it only offers these indicators without actual message content. To achieve message preview functionality, you can leverage XEP-0369: Mediated Information eXchange (MIX); however, ConverseJS currently does not appear to support XEP-0369.

XEP-0369 allows clients to request and retrieve a limited number of recent messages from a room without formally joining it. This enables a richer preview experience, displaying actual message snippets along with sender information and timestamps.

poVoq commented 2 months ago

Ah, I think it only works on Anonymous SASL setups where you can prejoin the user and ask for the nick after showing a preview of the channel.