Page MenuHomePhabricator

Implement notificationsCreationData for send-text-message-spec
AbandonedPublic

Authored by marcin on Aug 7 2024, 9:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:20 PM
Unknown Object (File)
Sun, Nov 10, 12:24 PM
Unknown Object (File)
Sun, Nov 10, 4:50 AM
Unknown Object (File)
Sat, Oct 26, 6:20 PM
Unknown Object (File)
Oct 12 2024, 7:07 AM
Unknown Object (File)
Oct 10 2024, 1:10 PM
Unknown Object (File)
Oct 10 2024, 1:10 PM
Unknown Object (File)
Oct 10 2024, 12:01 PM
Subscribers

Details

Reviewers
kamil
tomek
ashoat
Summary

This differential implements notificationsCreationData for send-text-message-spec. Now calling sendDMOperation will result in sending e2ee notifs to thick thread members

Test Plan
  1. Apply this small patch: https://gist.github.com/marcinwasowicz/6b3087442043ae46e612a0cae89ff7b2 - only modify thick thread selector to return normal thread and call sendDMOperation from input bar on web and native.
  2. Send messages back and forth. Each message should result in two notifications looking the same

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-8237
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 7 2024, 10:01 AM
Harbormaster failed remote builds in B30983: Diff 43223!
marcin requested review of this revision.Aug 8 2024, 1:51 AM
lib/shared/dm-ops/send-text-message-spec.js
76–83

Is there duplication here? I can see similar code in lines 24-31.

In this case there is hardly any duplication, since the code is so simple. But for other specs, I could imagine more duplication.

I wonder if this should be factored out. It could either be factored out as an implementation detail (eg. each spec has it factored out as a convention), or as a hard rule (all message specs must implement a function that goes from dmOp to MessageData).

lib/shared/dm-ops/send-text-message-spec.js
76–83

If you take a look at the very next diff you will see that even though MessageData are created both in processDMOperation and notificationsCreationData the detailed logic is different somehow and there is no straightforward way to factor the code out.

lib/shared/dm-ops/send-text-message-spec.js
76–83

We can follow up in that diff, but I don't understand why the logic should be different

ashoat requested changes to this revision.Aug 8 2024, 7:26 AM
This revision now requires changes to proceed.Aug 8 2024, 7:26 AM