Repository navigation
[Payment due @aimane-chnaif] Skip card decline notifications for workspace members other than the cardholder - #103161
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safaritest.mov |
|
I tested via a patched dev build since I don't have real Expensify Card.
This covers the shared function both paths use. |
|
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
The change looks correct, and I found no blocking bugs. Two follow-ups to consider:
NitThe |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
Julesssss
left a comment
There was a problem hiding this comment.
LGTM,had some NAB comments about additional tests but no real need for them.
|
🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.5.6-0 🚀
|
|
No help site update needed. This is a bug fix: admins and auditors no longer get sound or browser alerts for card decline messages meant only for the cardholder. No article says those users get these alerts. The Expensify Card Notifications article says only the cardholder gets them, which is still true. |
|
Hi @youssef-lr. How can we trigger a decline on an Expensify card?
|
|
@IuliiaHerets I think this is tricky to reproduce, it needs an actual card declined system message. We can check it off. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.6-6 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #103655 |

Explanation of Change
Card decline messages are meant only for the cardholder, but admins and auditors who follow the workspace chat still get a sound and a browser notification for them.
We'll skip the notification when an action asks to notify only its
actionableForAccountIDs(shouldScopePushToActionableAccounts) and the current user isn't one of them. Mobile push already applies the same check on the server inSendFetchableOnyxUpdates.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/689061
$ #96274
PROPOSAL: N/A
Tests
Offline tests
Same as tests. The notification is shown when the update arrives, which doesn't happen offline.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari