Page MenuHomePhabricator

[lib] Update `SendMultimediaMessageRequest` type
ClosedPublic

Authored by atul on Sep 5 2022, 9:42 PM.
Tags
None
Referenced Files
F3522733: D5061.id16342.diff
Mon, Dec 23, 7:32 AM
F3522718: D5061.id16536.diff
Mon, Dec 23, 7:27 AM
F3522621: D5061.id16522.diff
Mon, Dec 23, 7:16 AM
F3522421: D5061.id16521.diff
Mon, Dec 23, 6:42 AM
F3522341: D5061.id16535.diff
Mon, Dec 23, 6:32 AM
F3521219: D5061.diff
Mon, Dec 23, 2:42 AM
Unknown Object (File)
Mon, Dec 16, 5:00 AM
Unknown Object (File)
Fri, Dec 13, 11:06 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

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