Page MenuHomePhabricator

[keyserver] Modify `legacyMultimediaMessageCreationResponder` to handle new payload
ClosedPublic

Authored by atul on Sep 5 2022, 9:43 PM.
Tags
None
Referenced Files
F1713765: D5062.id16591.diff
Tue, May 7, 9:30 AM
Unknown Object (File)
Sun, May 5, 3:37 PM
Unknown Object (File)
Sun, May 5, 4:41 AM
Unknown Object (File)
Fri, May 3, 5:08 AM
Unknown Object (File)
Thu, May 2, 10:30 PM
Unknown Object (File)
Sun, Apr 28, 9:37 PM
Unknown Object (File)
Sun, Apr 28, 9:36 PM
Unknown Object (File)
Sun, Apr 28, 9:36 PM
Subscribers

Details

Summary

This is a temporary change on the keyserver side that keeps things working as they are when client hits create_multimedia_message with the new payload.

We're basically translating mediaMessageContents back to mediaIDs by pulling out the uploadID property.

This ensures that the client continues working as normal with the new payload while we're still working on implementing the "new" multimediaMessageCreationResponder.


Depends on D5061

Test Plan

Able to send image(s) on web and native as expected.

Set breakpoints at various points throughout the media message flow and observed that values were as expected at each point.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D5062_1 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Sep 5 2022, 9:52 PM
tomek requested changes to this revision.Sep 8 2022, 8:12 AM

Not sure if something went wrong during rebase, but this change was already included as a part of D5061

keyserver/src/responders/message-responders.js
119 ↗(On Diff #16343)

We could modify this function to accept only "legacy" shape

This revision now requires changes to proceed.Sep 8 2022, 8:12 AM
In D5062#148425, @tomek wrote:

Not sure if something went wrong during rebase, but this change was already included as a part of D5061

Shoot yeah looks like I made a mistake while rebasing, I'll go through the stack and diff history to clean it up. Thanks for catching

keyserver/src/responders/message-responders.js
119 ↗(On Diff #16343)

Good point, I'll take the tShapes within sendMultimediaMessageRequestInputValidator and name them so they can be used outside of the t.union (eg as the type for request argument to legacyMultimediaMessageCreationResponder(...)).

use nullish coalescing instead of ternary

ok go back to ternary to attempt to fix flow

This revision is now accepted and ready to land.Sep 9 2022, 8:24 AM

rebase after fixing merge conflicts and before landing