-
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
feat: support for local assets preview (#WPB-15738) #3308
base: epic/wire-cells
Are you sure you want to change the base?
Conversation
|
Test Results316 tests 307 ✅ 39s ⏱️ Results for commit 054ff0c. ♻️ This comment has been updated with latest results. |
Datadog ReportBranch report: ✅ 0 Failed, 1 Passed, 0 Skipped, 0s Total Time |
@@ -148,6 +149,7 @@ FROM Message | |||
JOIN UserDetails ON Message.sender_user_id = UserDetails.qualified_id | |||
LEFT JOIN MessageTextContent AS TextContent ON Message.id = TextContent.message_id AND Message.conversation_id = TextContent.conversation_id | |||
LEFT JOIN MessageAssetContent AS AssetContent ON Message.id = AssetContent.message_id AND Message.conversation_id = AssetContent.conversation_id | |||
LEFT JOIN Asset AS AssetData ON AssetContent.asset_id = AssetData.key |
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.
instead of storing path within DB does it make sense to have a fixed path
something like
/appData/files/{conversaion_id}/{file_type}/{asset_key}
this way we can avid this left join and we can always get the correct path ?
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.
Good idea, but we are not just storing the path, we are also observing the path changes. So when the app downloads and decrypts the asset the path is updated and UI can immediately use it to show the preview.
The only way to do it with the fixed paths is to set up file observer for the /appData/files/ folder.
https://wearezeta.atlassian.net/browse/WPB-15738
https://wearezeta.atlassian.net/browse/WPB-15736
PR Submission Checklist for internal contributors
What's new in this PR?
Support for rendering assets preview after downloading / decrypting. To show local preview user needs to download and decrypt the asset file.
LocalData
field to asset data to have a reference to local file for the asset. This file is used for rendering video / pdf previews.SendTextMessageUseCase
removed test code for sending multiple attachments.