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)
Sun, Jun 30, 4:00 AM
Unknown Object (File)
Sat, Jun 29, 9:28 PM
Unknown Object (File)
Sat, Jun 29, 1:36 AM
Unknown Object (File)
Thu, Jun 27, 8:31 PM
Unknown Object (File)
Thu, Jun 27, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 2:16 AM
Unknown Object (File)
Tue, Jun 25, 12:21 PM
Unknown Object (File)
Thu, Jun 6, 9:50 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.