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

All replies and mentions are removed in AC for receiver after sender removes the last message in community chat #17052

Closed
VolodLytvynenko opened this issue Aug 18, 2023 · 6 comments · Fixed by status-im/status-go#5789 · May be fixed by #21157

Comments

@VolodLytvynenko
Copy link
Contributor

Steps to reproduce:

  1. User_A and User_B are both in the same community.
  2. User_A sends several replies or mentions to User_B.
  3. User_A sends one more message and then deletes it using the 'delete for everyone' option.
  4. User_B checks the AC.

Actual result:

All mentions and replies in the AC are removed for User_B.

Expected result:

Mentions and replies should not be removed from the AC after the last message is deleted.

Additional info:

This issue is similar in group chats, with the exception that only replies are removed from the AC. Mentions are not removed and

@cammellos
Copy link
Member

@ajayesivan any update on this?

@ajayesivan
Copy link
Contributor

@cammellos unread-notification count & notification list values coming from status-go API is wrong. I'm looking into the DeleteActivityCenterNotificationForMessage function in status-go.

@churik
Copy link
Member

churik commented Jun 21, 2024

still valid and very weird bug (checked on nightly 21/06/24)

@yqrashawn
Copy link
Contributor

CleanShot 2024-07-15 at 13 22 13@2x

so all notifications have the same last-message
and status-go delete notification by matching
to-be-deleted-message-id
with both notification message id and notification last-message id
code at

https://github.com/status-im/status-go/blob/131cfe7b3daec24f2ea56bdfa3b26ab931ea7a0f/protocol/activity_center_persistence.go#L62-L70

	for _, notification := range notifications {
		if notification.LastMessage != nil && notification.LastMessage.ID == messageID {
			withNotification(notification)
		}

		if notification.Message != nil && notification.Message.ID == messageID {
			withNotification(notification)
		}
	}

@yqrashawn
Copy link
Contributor

last message check is added at status-im/status-go#2854
in order to fix #13933

yqrashawn added a commit to status-im/status-go that referenced this issue Jul 22, 2024
yqrashawn added a commit to status-im/status-go that referenced this issue Jul 22, 2024
yqrashawn added a commit to status-im/status-go that referenced this issue Jul 22, 2024
@yqrashawn
Copy link
Contributor

next up: status-im/status-go#5520 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment