App icon indicating copy to clipboard operation
App copied to clipboard

Email notification - Marking messages as unread triggers the email notification

Open isagoico opened this issue 5 years ago • 13 comments

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:

  1. Log in to e.cash as account A
  2. Navigate to a conversation with account B
  3. Mark a message from account A as unread and navigate away from the chat.
  4. 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:

image

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


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.

isagoico avatar May 18 '21 20:05 isagoico

Triggered auto assignment to @sonialiap (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar May 18 '21 20:05 MelvinBot

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:

  1. navigate into an existing message thread with a coworker
  2. mark a message from coworker as unread image
  3. navigate into a different chat (I navigated into the chat with Sonia Expensifail) image
  4. check email inbox for email containing "Got it" image
  5. Didn't find any notifications

@isagoico am I missing something in my reproduction steps?

sonialiap avatar May 22 '21 05:05 sonialiap

Is this a duplicate of https://github.com/Expensify/Expensify.cash/issues/2857 ?

marcaaron avatar May 26 '21 15:05 marcaaron

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 🤔

isagoico avatar May 26 '21 16:05 isagoico

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 🤯

isagoico avatar May 26 '21 17:05 isagoico

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.

isagoico avatar May 26 '21 17:05 isagoico

Thanks for confirming the steps!

sonialiap avatar Jun 02 '21 17:06 sonialiap

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Jun 02 '21 17:06 MelvinBot

Ah interesting. I'll investigate this one because I'm curious about it too.

TomatoToaster avatar Jun 02 '21 23:06 TomatoToaster

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.

TomatoToaster avatar Jun 04 '21 22:06 TomatoToaster

@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:

  1. account A sends a message to account B. account B doesn't read the message.
  2. Before Bedrock runs the NotifyOfflineUsersAboutActivity job and sends an email notification to account B for that unread message, account A marks the message as unread on their end.
  3. 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.

jasperhuangg avatar Jul 10 '21 03:07 jasperhuangg

Going to make this a Monthly since it doesn't appear to still be happening.

jasperhuangg avatar Jul 14 '21 02:07 jasperhuangg

Let's just close it.

marcaaron avatar Jul 14 '21 02:07 marcaaron