Page MenuHomePhabricator

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

Authored by atul on Sep 5 2022, 9:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 2:51 AM
Unknown Object (File)
Tue, Nov 5, 11:28 AM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Sat, Nov 2, 1:14 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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