department-of-veterans-affairs / va-mobile-app

"If VA were a company, it would have a flagship mobile app."
https://department-of-veterans-affairs.github.io/va-mobile-app/
17 stars 2 forks source link

BUG - sev-3 - All - Messaging push notification deeplinking persists through logout #9612

Open TKDickson opened 2 months ago

TKDickson commented 2 months ago

What happened?

Messaging push notifications right now - for lack of a better term - are too 'sticky'. (see video towards end of ticket, or read through steps here)

Have confirmed that this is also happening on the 2.36 RC branch, so it's not specific to the RQ update I'm testing.

Also, I've written this with messaging information because I don't have the ability to send any other kind of notification in staging. I assume currently this would happen with all notifications, not just messaging, but I can't test that assumption.

Specs:

Steps to Reproduce

Desired behavior

I don't know what the heck is going on technically, but the user behavior here is that deeplinking from a specific push notification should happen once (when you tap on a push notification the first time), and then never again.

Acceptance Criteria

Bug Severity - BE SURE TO ADD THE SEVERITY LABEL

See [Bug Tracking](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/QA#issue-severity) for details on severity levels

Linked to Story

Screen shot(s) and additional information

Here's a video showing me logged in as John Weaver, receiving a PN and following it, logging out, logging in as Judy Morrison, and being taken to John Weaver's message (which is, of course, an error for Judy).

Full JSON response for services related to issue (expand/collapse)

Ticket Checklist

TKDickson commented 2 months ago

Recommendation for the fix from Dylan -

when playing around in the Notification RQ branch fixing the duplicate api calls I found that we can clear those out with Notifications.removeAllDeliveredNotifications() and likely just need to call that line of code whenever we are done linking them somewhere in the app