Page MenuHomePhabricator

Extract logic of pushInfo -> usersToCollapsableNotifInfo to lib and use for client-based notifs
ClosedPublic

Authored by marcin on Aug 12 2024, 6:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 8, 6:17 PM
Unknown Object (File)
Fri, Sep 6, 11:31 AM
Unknown Object (File)
Fri, Sep 6, 11:14 AM
Unknown Object (File)
Fri, Sep 6, 7:22 AM
Unknown Object (File)
Thu, Sep 5, 5:19 PM
Unknown Object (File)
Thu, Sep 5, 12:17 PM
Unknown Object (File)
Thu, Sep 5, 4:23 AM
Unknown Object (File)
Tue, Sep 3, 1:35 PM
Subscribers

Details

Summary

This differential extracts teh logic that groups notifications message infos by collapse key to lib. This is necessary to have working e2ee notifs for sidebar creation. Without this work we would call notificationsTexts on CREATE_SIDEBAR message data and this crashes the app.

Test Plan

For now test that keyserver notifs are not regressed by this diff.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
keyserver/src/fetchers/message-fetchers.js
134–137 ↗(On Diff #43555)

Can we avoid having a function that modifies its arguments? This is really bad for maintenance.

This revision is now accepted and ready to land.Tue, Aug 27, 12:19 AM

Make mergeUserToCollapsableInfo pure.

lib/push/send-utils.js
254–257

Should these inputs be read-only?

300–303

Should these inputs be read-only?

lib/push/send-utils.js
254–257

Good catch. Created: https://phab.comm.dev/D13271 to fix.