group-income icon indicating copy to clipboard operation
group-income copied to clipboard

Remove notification from the direct message which is not part of

Open Silver-IT opened this issue 1 year ago • 8 comments

Problem

Steps to reproduce

  • u1 signs up, and creates a group g1
  • u2 joins the group g1
  • u2 creates a new group g2
  • u1 creates a new direct messages with u2, and says greetings
  • u2 opens the direct message with u1, and reads the message
  • u2 leaves the group g1
  • u1 sends a message to u2 through the direct message
  • u2 still gets a notification for the message, and has the badge on the browser tab

What should be happening

  • Notification should not be happening for u2
  • Badge should not be there in the browser tab

Solution

Find the reason of the unexpected result, and implement the above ideal workflow

@taoeffect, I have added Note:Discussion label in this issue in order to discuss the following

  • Should the direct message be hidden for the user u1 after u2 leaved the group? (I think NO, because we could have direct messages between several members)

Silver-IT avatar Feb 08 '24 08:02 Silver-IT

@Silver-IT

Should the direct message be hidden for the user u1 after u2 leaved the group?

Users can always send DMs to users who were part of their group, regardless of whether they left or not. And in the future, users will be able to initiate DMs with members who were never in a group with them (by creating a request to accept the DM).

So it's unclear to me what the problem is in this issue, u2 should be notified when u1 messages them.

taoeffect avatar Feb 08 '24 17:02 taoeffect

Oh - I see, this is related to #1636 and #1619... indeed. It is both true that:

  1. We do not want DMs appearing between members who are not in the group when scoped to the group.
  2. But we do want the DMs to remain open, because all DMs should be visible through the dashboard view (#1619 - see also Figma). So yes, there should be a notification, but clicking it should take you to the DM on the dashboard, which hasn't been implemented yet, and that might be a good next issue to work on

taoeffect avatar Feb 08 '24 17:02 taoeffect

We do not want DMs appearing between members who are not in the group when scoped to the group.

The DMs, which are scoped to a group, between members who are not in the group should not be appearing. So in Step 7, u1 cannot send message to u2 who is already left the group.

But we do want the DMs to remain open, because all DMs should be visible through the dashboard view. So yes, there should be a notification.

I mean only the group-scoped DM in this issue, because we haven't implemented the global DM yet. So the problem is that u2 should not get notified the messages from the group-scoped chatroom after leaving the group or the chatroom.

Silver-IT avatar Feb 09 '24 02:02 Silver-IT

I mean only the group-scoped DM in this issue, because we haven't implemented the global DM yet.

We have implemented global DMs I think. DMs are just DMs. They are the same in the code whether they are between group members or not.

The only thing I think we haven't implemented is showing them in the UI on the global dashboard.

So the problem is that u2 should not get notified the messages from the group-scoped chatroom after leaving the group or the chatroom.

They should always get notified regardless of the fact. If there's an open DM between the two people, it remains open even if one person left the group. And if the DM is open, then they should get a notification about it. The only difference is that when they click the notification they should be redirected to the global dashboard where they can see the DM.

taoeffect avatar Feb 09 '24 18:02 taoeffect

The only thing I think we haven't implemented is showing them in the UI on the global dashboard.

Correct.

They should always get notified regardless of the fact. If there's an open DM between the two people, it remains open even if one person left the group. And if the DM is open, then they should get a notification about it. The only difference is that when they click the notification they should be redirected to the global dashboard where they can see the DM.

If it's the global DM, you said the true. But the problem in this issue is that the DM is group-scoped DM. Why should the user (u2 in the above steps) get notified after leaving the group? The message is from the group-scoped DM, and the user already leaved the group. Even though the user click the notification, he can not be redirected to the group-scoped DM channel.

Silver-IT avatar Feb 11 '24 23:02 Silver-IT

But the problem in this issue is that the DM is group-scoped DM.

I want to be clear: there must not be any such thing as a group-scoped DM. There are only DMs. And if they are between two people who happen to be in the same group, we happen to show them inside of the group for convenience.

Why should the user (u2 in the above steps) get notified after leaving the group?

Because DMs are never "group-scoped". DMs are always direct communications between individuals.

Even though the user click the notification, he can not be redirected to the group-scoped DM channel.

Correct, that's a bug that exists because we have not implemented the group dashboard yet. We need to implement the dashboard to fix this.

taoeffect avatar Feb 12 '24 00:02 taoeffect

I have been thinking that we still have group-scoped DM (or can be called per-group DM). REF: #1636

But now, you said the clear. There is no group-scoped DM. Inside the group, users can create DM between the active group members, and only the DMs between the active group members are listed. And in the global dashboard, all the DMs are listed.

Silver-IT avatar Feb 12 '24 00:02 Silver-IT

对,正是这样 👍

taoeffect avatar Feb 12 '24 00:02 taoeffect