-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: delete asset file when removing self-deleting msg [WPB-1807] 🍒 #3034
fix: delete asset file when removing self-deleting msg [WPB-1807] 🍒 #3034
Conversation
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3034 +/- ##
========================================
Coverage 52.52% 52.53%
========================================
Files 1301 1301
Lines 50043 50041 -2
Branches 4663 4664 +1
========================================
+ Hits 26286 26289 +3
+ Misses 21884 21880 -4
+ Partials 1873 1872 -1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 3096 Passed, 107 Skipped, 11.61s Total Time |
This PR was automatically cherry-picked based on the following PR:
Original PR description:
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Asset file is not removed from the storage once the self-deleting asset message timer runs out.
Causes (Optional)
Wrong order of actions:
Solutions
Change the order of actions, so that now it will look like this:
Thanks to that, the asset file and asset data will be removed from the asset table right when the content of the message is being cleared and marked as deleted. Asset is being removed only locally, there's no need to make a request that will probably fail.
Also,
selectPendingEphemeralMessages
is fixed to return only real pending messages, so messages that has yet not started (messages without end time) should be filtered out, to make sure that only messages that has been shown to the user are enqueued.Testing
Test Coverage (Optional)
How to Test
Send a self-deleting message with asset, wait until that message disappears and check if "used storage" has changed.
Attachments (Optional)
self-deleting-remove-asset-before.mov
self-deleting-remove-asset-after.mov
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.