zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.22k stars 7.67k forks source link

Make it possible to convert direct message threads to topics #20501

Open alya opened 2 years ago

alya commented 2 years ago

In some conversations that start as DM threads, participants realize that they'd be better off continuing the discussion in a stream. For example, they may need to specifically add more people to the conversation, take advantage of threading for a complex discussion, or simply want to continue the conversation in a public venue for the record. It would therefore be useful to be able to move a private conversation into a topic, in either a new or existing stream.

As discussed in #10862 and in CZO, this feature has complex privacy tradeoffs. It can be a bad experience to have one's messages with a particular intended audience suddenly become visible to a broader group.

This issue describes an MVP implementation that attempts to strike a balance between utility and privacy considerations, while making use of existing UI elements. It is a concrete implementation proposal for #10862.


(Note: The precise wording of the strings can be finalized later; this is an initial pass.)

Add a setting to Personal Settings > Account & Privacy > Privacy

TBD:

Organization administrators should be able to change the default for their organization under Organization settings > Default user settings.

Add an option to the three-dot menu for DM messages (in the message feed)

This option should open up a message edit menu similar to the menu for moving topics.

Restrictions

At the top of the message box, we should have a heading and list any restrictions on moving the messages, based on the personal setting described above. E.g.

Move private messages to topic

@person1, @person2 do not allow their messages to be moved.
@person3 only allows their messages to be moved into private channels they are subscribed to.
Everyone can change their personal settings under [Account & Privacy](/#settings/account-and-privacy).

Restrictions by the user making the move are not listed. We may need to add a new API endpoint to fetch other users' preferences for this, given a set of user IDs. It would be reasonable for prototyping to start by implementing this frontend-side check last and rely on the server to reject the move if not allowed by other users' settings in initial versions.

Button to make a stream without moving history

This button should always be present.

Button: "Convert to stream without moving messages" Action: Pops up a "Create stream" modal with DM participants pre-selected as members. (Participants can be removed.)

Move messages UI

If everyone allows their messages to be moved (possibly with restrictions) we should show a stream/topic selection menu as for moving topics, but with the following modifications:

Selecting the "Create new stream" option pops up a "Create stream" modal with DM participants pre-selected as members. Participants cannot be removed, but more can be added. Permitted stream types are controlled by the most restrictive permissions. Once the user clicks "Create", the name of the stream is filled in in the stream selector.

Dropdown for what to move

Options:

These last two options likely involve extending the update_message API, and thus are to some extent independent changes.

Other considerations

Confirmation

After the user clicks "Move", we should pop up a confirmation dialog, which clearly indicates what's being moved where and the implications. Exact wording TBD, but something like "Move 27 messages to #stream>topic" will work for a prototype.

Add option to a three-dot menu for DMs (in the left sidebar)

This option should have similar functionality to the message option described above. Since there is no message selected, the dropdown options for what to move should be just:


As a follow-up to this issue, we can implement functionality for requesting permission for moving messages. In this MVP version, users would have to (temporarily or permanently) change their privacy settings in order to grant permission for their messages to be moved.

CZO discussion thread

zulipbot commented 2 years ago

Hello @zulip/server-message-view, @zulip/server-sidebars, @zulip/server-streams members, this issue was labeled with the "area: left-sidebar", "area: message-editing", "area: stream settings" labels, so you may want to check it out!

gautelund commented 2 years ago

I will make the case for @showell's suggestion about consent. Use case:

The placeholder mechanism may be unnecessary complicated and a different way would be that Bob and Lisa get a message that we are waiting for Tracy's approval, and they can keep chatting until Tracy accepts and all messages incl. the new ones are moved.

I understand that this consent infrastructure adds work and complexity, but it would make the feature a lot better. Else, you might not use it that much because there's almost always someone who have set this to "Never".

gautelund commented 2 years ago

For those particularly interested, here's a thorough discussion on this subject.

xpufx commented 2 years ago

I was skimming the github issue and the discussion on zulip and I went in with a "what privacy issue?" mindset because we're using zulip in a company environment and I hadn't considered all scenarios.

This feature sounds more challenging the more I think about it. One issue I can think of immediately while reading @gautelund's summery above is with the proposal "Tracy's messages are shown as placeholders. " It would be possible to infer from the conversation what Tracy said. That's just the nature of conversations. The conversation might not have even gone the way it did if it were not private at the beginning. So I don't think hiding some participants' input will work.

Another thing that came to mind is what happens when more users are later added to the stream? I am assuming the consent would be just a one time thing. I believe this would make the formerly private conversation to future participants (depending on the configuration). Does Tracy accept the move based on the current conversation participants or forever?

By the way. Apologies if I missed it but it looks like we're talking about moving conversations to a new stream. The use case I just needed now is to move parts of a private conversation to an existing stream. We have a 2 person stream with this person where we use topics for the more important things where I use the resolved button. We still keep a private conversation for the quicker one off things. I noticed we discussed something with a topic in the private chat instead. Not that I am requesting this over all the other things that need to be taken care of first, but the use case does exist. ( I can copy/paste the important bits to complete the stream topic history)

alya commented 2 years ago

Thanks for sharing your thoughts @xpufx !

The proposal above is to allow the messages to be moved to an existing stream (as long as it meets participants' privacy settings), but to include a "Create new stream" option in the same UI.

carun commented 2 months ago

To preserve privacy, instead of moving the direct messages to a new topic, can we give the option to convert it into a new channel? The reason is, the participants of that new channel can be the same individuals who were part of the direct chat and thus privacy is still preserved.