Page MenuHomePhabricator

[lib] Update `rawMessageInfoFromClientDB` to handle both `IMAGES` and `MULTIMEDIA` message types
ClosedPublic

Authored by atul on Nov 15 2022, 7:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 6:25 PM
Unknown Object (File)
Thu, Sep 19, 12:59 PM
Unknown Object (File)
Sun, Sep 15, 6:07 AM
Unknown Object (File)
Sun, Sep 15, 6:07 AM
Unknown Object (File)
Sun, Sep 15, 6:07 AM
Unknown Object (File)
Sun, Sep 15, 6:07 AM
Unknown Object (File)
Sun, Sep 15, 6:07 AM
Unknown Object (File)
Sun, Sep 15, 6:04 AM
Subscribers

Details

Reviewers
tomek
marcin
ginsu
rohan
kamil
ashoat
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rCOMM23cf15da298b: [lib] Update `rawMessageInfoFromClientDB` to handle both `IMAGES` and…
Summary

Update rawMessageInfoFromClientDB to handle MULTIMEDIA messages in addition to IMAGES messages.


Depends on D5636

Test Plan

Set breakpoints and observed expected behavior.

Will also be tested implicitly by subsequent diffs/video work.

Finally, will re-introduce Redux/SQLite equality checks for myself to make sure that IMAGES/MULTIMEDIA messages are persisted/unpersisted correctly.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D5637
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Will add some unit tests for this function later in the stack

atul requested review of this revision.Nov 15 2022, 7:17 PM
atul added a reviewer: Restricted Owners Package.Nov 16 2022, 2:55 PM
lib/shared/messages/multimedia-message-spec.js
90–94 ↗(On Diff #18451)

I'm confused, why'd we get rid of the invariant?

lib/shared/messages/multimedia-message-spec.js
90–94 ↗(On Diff #18451)

Based on feedback here: https://phab.comm.dev/D5313?id=17390#inline-35170 regarding translateClientDBMediaInfosToMedia

lib/shared/messages/multimedia-message-spec.js
90–94 ↗(On Diff #18451)

Actually that's a different situation because

In this case it is completely valid for clientDBMessageInfo to have these fields empty

isn't accurate/relevant here. I'll revert and bring back invariant.

ashoat requested changes to this revision.Nov 17 2022, 10:23 AM

To your queue

This revision now requires changes to proceed.Nov 17 2022, 10:23 AM
This revision is now accepted and ready to land.Nov 17 2022, 11:57 AM
This revision was landed with ongoing or failed builds.Nov 17 2022, 12:13 PM
This revision was automatically updated to reflect the committed changes.