-
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] #3027
fix: delete asset file when removing self-deleting msg [WPB-1807] #3027
Conversation
Quality Gate passedIssues Measures |
Datadog ReportBranch report: ✅ 0 Failed, 3089 Passed, 107 Skipped, 12.24s Total Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done 💅
…3034) * fix: delete asset file when removing self-deleting msg [WPB-1807] (#3027) * trigger build --------- Co-authored-by: Michał Saleniuk <[email protected]> Co-authored-by: Michał Saleniuk <[email protected]>
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
.