Page MenuHomePhabricator

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

Authored by atul on Sep 5 2022, 9:43 PM.
Tags
None
Referenced Files
F3559498: D5062.id16591.diff
Fri, Dec 27, 6:13 AM
F3559497: D5062.id16597.diff
Fri, Dec 27, 6:13 AM
F3559496: D5062.id16343.diff
Fri, Dec 27, 6:13 AM
F3559495: D5062.id16527.diff
Fri, Dec 27, 6:13 AM
F3559494: D5062.id16526.diff
Fri, Dec 27, 6:13 AM
F3559493: D5062.id16524.diff
Fri, Dec 27, 6:13 AM
F3559447: D5062.id.diff
Fri, Dec 27, 6:12 AM
F3559418: D5062.diff
Fri, Dec 27, 6:05 AM
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