Email notification - Marking messages as unread triggers the email notification
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Expected Result:
Marking messages as unread should not trigger the email notification.
Actual Result:
Marked as unread messages trigger the email notification. If you mark as unread a message from Account A, account B will get the email notification (even if it was marked as unread by account A)
Action Performed:
- Log in to e.cash as account A
- Navigate to a conversation with account B
- Mark a message from account A as unread and navigate away from the chat.
- Wait for 10 min and check account B email inbox.
Workaround:
Unknown.
Platform:
Where is this issue occurring?
Web ✔️ iOS Android Desktop App Mobile Web
Version Number: 1.0.48-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:


Expensify/Expensify Issue URL:
From @quinthar https://expensify.slack.com/archives/C01GTK53T8Q/p1621361714009600
Marking content as unread causes it to be re-notified via email. Which makes total sense, but just wasn't what I expected. I would think that content would only get notified out via email once, even if it's marked as unread multiple times.
Triggered auto assignment to @sonialiap (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
I am not able to reproduce this myself but based on slack + Isa, that's 5 people who are able to reproduce it.
I thought there might be some delay but I haven't received an email notification after waiting 2 hours. Here are the steps I took:
- navigate into an existing message thread with a coworker
- mark a message from coworker as unread

- navigate into a different chat (I navigated into the chat with Sonia Expensifail)

- check email inbox for email containing "Got it"

- Didn't find any notifications
@isagoico am I missing something in my reproduction steps?
Is this a duplicate of https://github.com/Expensify/Expensify.cash/issues/2857 ?
They are really similar but nope. On https://github.com/Expensify/Expensify.cash/issues/2857 there was no manually marking as unread but the user the messages got marked as unread by an unknown reason atm 🤔
Mmm @sonialiap Yes you executed the correct steps. I'm going through them again to confirm and I'm not getting the email notification 🤔 I was able to reproduce the issue before easily 🤯
Oh wait, I was looking at the wrong email inbox 🤦. The email is being triggered again for the user on the other side of the conversation. So e.g:
- Logged in as account A
- Navigate to a conversation with account B If you mark as unread a message from Account A, account B will get the email notification (even if it was marked as unread by account A) If the message marked as unread is from account B, account A will get the email notification.
Let me know if you're able to reproduce the issue this way, I'll make it clearer in the OP.
Thanks for confirming the steps!
Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Ah interesting. I'll investigate this one because I'm curious about it too.
Ok I'm going to put this back into the pool for now since it's important to work on, and it requires some investigation I don't have the bandwidth to do at the moment. If no one picks it up in a bit and my plate clears up, I'll come back to this one. This is likely going to require an Internal solution, so it makes sense to keep that label.
@isagoico Just to clarify, was account B online to read the message when account A first sent it? I just tried this myself on dev–verifying that account B had read the message–and I wasn't able to reproduce this issue.
cc @TomatoToaster
For some context, whenever a user sends a message in any report, a NotifyOfflineUsersAboutActivity job is queued up in Bedrock. When this job runs, it looks for the last unread action for each user and queues up an email notification if the user has any unread items.
So, what might have happened here is this:
- account A sends a message to account B. account B doesn't read the message.
- Before Bedrock runs the
NotifyOfflineUsersAboutActivityjob and sends an email notification to account B for that unread message, account A marks the message as unread on their end. - The email notification is sent to account B. Nothing is sent to account A because we don't queue up notifications for unread items sent by the same user.
This would make it seem like the account A marking the message as unread triggered an email notification to account B, even though the email would have been sent out regardless of what account A did.
Going to make this a Monthly since it doesn't appear to still be happening.
Let's just close it.