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)
Thu, Nov 14, 1:02 PM
Unknown Object (File)
Thu, Nov 14, 12:59 PM
Unknown Object (File)
Tue, Oct 22, 10:44 AM
Unknown Object (File)
Tue, Oct 22, 10:19 AM
Unknown Object (File)
Tue, Oct 22, 10:19 AM
Unknown Object (File)
Tue, Oct 22, 10:19 AM
Unknown Object (File)
Tue, Oct 22, 10:19 AM
Unknown Object (File)
Tue, Oct 22, 10:19 AM
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.Aug 27 2024, 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.