This differential extracts a common logic that uses thread subscription, user role and mentioning to decide whether to send a notif. Moreover this logic is used in the client-send code.
Details
Details
- Test that chat muting and user mentioning (also for ENS users) works on the keyserver from the notif perspective.
- To test the client, apply patch from D12477 and then:
- Without any changes there should be no notif payloads generated.
- Play around with hardcoding different configurations of thread subscriptions and examine content of generated notifs.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/push/utils.js | ||
---|---|---|
168–173 | This is too many parameters. Please replace with an object param, and keep this in mind going forward |
lib/push/utils.js | ||
---|---|---|
214–229 ↗ | (On Diff #41949) | This code was copy pasted when it was extracted to lib from the keyserver therefore I would prefer to keep it untouched. |
lib/push/send-utils.js | ||
---|---|---|
80 ↗ | (On Diff #41949) | Actually the only usage of this type looks like this: const pushUserThreadInfos: { [userID: string]: PushUserThreadInfo } = {}; for (const threadID of threadsToMessageIndices.keys()) { so we need mutability here. I think it is better to just drop type declaration and type the variable inline with mutable type. |