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)
Fri, Dec 27, 1:41 AM
Unknown Object (File)
Fri, Dec 27, 1:40 AM
Unknown Object (File)
Fri, Dec 27, 1:40 AM
Unknown Object (File)
Fri, Dec 27, 1:40 AM
Unknown Object (File)
Fri, Dec 27, 1:40 AM
Unknown Object (File)
Fri, Dec 27, 1:39 AM
Unknown Object (File)
Fri, Dec 20, 10:25 PM
Unknown Object (File)
Fri, Dec 20, 10:04 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
No Lint Coverage
Unit
No Test Coverage

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 ↗(On Diff #43712)

Should these inputs be read-only?

300–303 ↗(On Diff #43712)

Should these inputs be read-only?

lib/push/send-utils.js
254–257 ↗(On Diff #43712)

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