Page MenuHomePhabricator

[web] Encrypt media before uploading
ClosedPublic

Authored by bartek on Apr 3 2023, 2:24 PM.
Tags
None
Referenced Files
F3515389: D7294.id24587.diff
Sun, Dec 22, 8:42 AM
F3515328: D7294.id24736.diff
Sun, Dec 22, 8:31 AM
F3514067: D7294.diff
Sun, Dec 22, 3:23 AM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:48 PM
Unknown Object (File)
Sat, Dec 14, 4:43 PM
Subscribers

Details

Summary

This is the final diff that adds support for uploading encrypted media.

Media support in web input-state-container works differently but it's as complicated as on native. Basically: firstly, we create a pendingUpload and enhance it with actual upload result. Then (when enter/send btn is clicked) we create message based on that pending upload.

Similiar to native version, the encrypted uploads functionality is hidden behind a boolean.

Depends on D7291, D7292, D7293, D7295

Test Plan

Set the sendEncryptedMedia to false. Send a photo/video/multiple media - confirm it works.
Set the flag to true. Repeat.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/encrypted-media/js
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 4 2023, 12:21 AM

For encryption both enabled and disabled, send a photo and confirm it works. Refresh the website to reload from keyserver.

I'm sure you tested this stack thoroughly, but generally would be good to put some more specifics on scenarios you tested in the Test Plan to give reviewers a bit more confidence. For example, did you test sending multiple encrypted photos at the same time?

Maybe a few screenshots/screen recordings to demonstrate expected behavior would also be a nice touch (though not strictly necessary)

web/input/input-state-container.react.js
305–323

Same feedback as previous diffs where it might improve readability to "handle the easy case first."

899–910

Sorry to keep adding changes that you'll need to rebase and make, but let's handle the "easy case first" here as well.

This revision is now accepted and ready to land.Apr 4 2023, 10:19 AM
This revision was automatically updated to reflect the committed changes.