Open Bug 1735549 Opened 4 years ago Updated 4 years ago

Old message notification on restart from sleep

Categories

(Chat Core :: General, defect)

Thunderbird 95
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: davross, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

Windows 11 - Beta channel
Thunderbird Daily - 95.0a

  1. Open Thunderbird and leave running in background
  2. Close laptop to evoke sleep
  3. Leave for some time (in reproducing I was afk around 1 hour)
  4. Open and login to W11 device

Actual results:

Notication pop-up of message around one month old. No matter view state. Happening to me several times per day on this old message.

Expected results:

Once message is viewed this state should stick.

It looks like we're setting delayed properly on the Matrix message, maybe the UI that fires the notification isn't properly checking this.

Martin -- any idea if we're missing something here?

We do always show a notification whenever we append a message that has containsNick set, no matter when it's from. If the account reconnects and replays that message whenever you wake from sleep, and that message gets added again (because it hasn't been marked as read yet), you'd get a notification again. (this is even worse with XMPP where you don't even get a read state for MUCs so you just get pinged on every connect)

That's rather unfortunate! Do you think using the delayed property to avoid this behavior makes sense?

Component: Matrix → General

I don't think that's quite the correct approach, since delayed is just used when a message is not delivered in "real time". It might still be a mention you haven't seen. Instead, arguably protocols shouldn't set containsNick if they know that the message was already read.

Looks like that might be hard to override currently: https://searchfox.org/comm-central/rev/af4783ca444808036d2a5860444e7322e904c09f/chat/modules/jsProtoHelper.jsm#1151-1155

I wonder if we need a separate flag for this since you would still want it to be logged properly that it contains the nick? We just don't want the notification to appear

There's some relevant code around https://searchfox.org/comm-central/rev/af4783ca444808036d2a5860444e7322e904c09f/chat/components/src/imConversations.jsm#612-614 too.

You need to log in before you can comment on or make changes to this bug.