status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

Message preview and unread counter are displayed on the recipient's side if the message was sent and deleted while the recipient was offline

Open qoqobolo opened this issue 3 years ago • 3 comments

Bug Report

Problem

Message preview and unread counter are displayed on the recipient's side on the Home screen if the message was sent and deleted while the recipient was offline. The number of unread messages increases with every deleted message. The issue is relevant for all chat and messages types.

Expected behavior

No message on the recipient's side when returning online

Actual behavior

https://user-images.githubusercontent.com/67952253/160586085-8f7b6520-400b-4c04-900c-ff3541d97368.MP4

Reproduction

  1. Device1 and device2 start a 1-1 chat
  2. Device2 closes the app
  3. Device1 sends a message and deletes it
  4. Device2 logs in

Additional Information

  • Status version: nightly 29/03
  • Operating System: Android, iOS

Logs

Sender geth.log Recipient geth.log

qoqobolo avatar Mar 29 '22 13:03 qoqobolo

I noticed something funny. When local notifications are switched on the receiving device the last message of a chat does not get updated when a message is deleted while the app is not active until the recipient replies in the chat. This behaviour also affects un-viewed messages counter and seems to have a relation with local notifications

The other case which I have managed to address is a scenario where the location notifications are switched off. The last message of a chat gets updated when a message is received, sent or deleted but the counter for un-viewed messages is not updated to account for the count of the deleted messages when the app on the receiving end is not active. This results in the count for un-viewed messages being more than the number of messages that have not been seen by the recipient. However this is something that I have looked into and solved on status-go and seems to work fine

jo-mut avatar Apr 11 '22 19:04 jo-mut

One more scenario with public chat. User A: join any public chats, send several messages, delete the last one, log out User B: join same public chat

Expected result: no last message is shown Actual result: User B is seeing last message (deleted) in preview

churik avatar Sep 12 '22 10:09 churik

@churik the issue for 1 on 1 chats is now resolved and it should also be resolved in the of public chats. I will however test to confirm that it works fine with public chats

jo-mut avatar Sep 12 '22 11:09 jo-mut

The label recheck is added in order to keep an eye on it while testing this part of the redesigned app.

churik avatar Dec 06 '22 10:12 churik