Page MenuHomePhabricator

[lib] Update `SendMultimediaMessageRequest` type
ClosedPublic

Authored by atul on Sep 5 2022, 9:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 6:34 PM
Unknown Object (File)
Mon, Nov 11, 5:47 PM
Unknown Object (File)
Mon, Nov 11, 2:03 PM
Unknown Object (File)
Mon, Nov 11, 1:53 PM
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
Subscribers

Details

Summary

Update SendMultimediaMessageRequest to handle "new" payload option which takes list of MediaMessageServerDBContent instead of a list of strings.

Depends on D5060

Test Plan

NA, no functional changes but addresses a flow issue in subsequent diff

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 5 2022, 9:44 PM
Harbormaster failed remote builds in B11899: Diff 16342!

add invariant to appease flow

keyserver/src/responders/message-responders.js
121 ↗(On Diff #16344)

This is just to appease flow, gets handled properly in D5062 where the invariant is removed.

update diff to remove temporary invariant introduced in D5061

atul requested review of this revision.Sep 5 2022, 9:59 PM
tomek added inline comments.
keyserver/src/responders/message-responders.js
121 ↗(On Diff #16344)

Not sure which invariant you are referring to.

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

Ah I see what happened, I introduced an invariant in this diff to appease flow... and was going to handle things correctly in the next diff. But it looks like I missed the git rebase --continue and amended the same diff.

Modified this diff to reflect Diff 2: 16344 which is what I intended this diff to be.

Screen Shot 2022-09-08 at 5.00.04 PM.png (150×1 px, 85 KB)

cut newline so it's identical to revision 2 of the diff

tomek added inline comments.
keyserver/src/responders/message-responders.js
121 ↗(On Diff #16523)

The change, that was introduced after the diff was accepted, breaks the master - invariant requires two arguments and throws an error if less is provided. @inka discovered that the lib is incorrectly typed in Flow - the types don't match the actual behavior. (that's why this diff passes CI)

sorry for breaking master, reverted the diff for now and will re-open

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

second argument to invariant

atul requested review of this revision.Sep 9 2022, 2:33 AM
This revision is now accepted and ready to land.Sep 9 2022, 2:48 AM