barkey/packages/backend
dakkar c927c30567 mark grouped notifs by oldest id - sort-of fix 1139
Misskey's code does the same, but our groups behave differently enough
that this may be not the best choice

for example, let's say we have:

- notifications 1-5 for reaction to note A
- notifications 6-8 for reaction to note B
- notifications 9-12 for reaction to note A
- notification 13-19 for non-groupable events
- notification 20 for reaction to note A

and that events happened one every minute (so the last notification is
from 20 minutes ago)

client requests the most recent 10 notifications; we fetch
notifications 1-10, and reply:

- grouped id 6 for reactions 6-8 to note B
- grouped id 10 for reactions 1-5, 9-10 to note A

then the client requests 10 more notifications, untilId=10; we fetch
notifications 11-20, and reply:

- non-grouped notifications 13-19
- grouped id 20 for reactions 11,12,20 to note A

because we sort by id, and also the `createdAt` marks the _newest_
event in each group, the client will then show:

  6 reactions to note B, 6 minutes ago
  4 reactions to note A, 1 minute ago
  notifications 13-19, 13 minutes to 19 minutes ago
  3 reactions to note A, 11 minutes ago

I don't know how to make this work better ☹
2025-07-03 14:16:20 +01:00
..
.vscode
assets Merge tag '2024.10.1' into feature/2024.10 2024-11-08 15:52:37 +00:00
migration remove IDX_instance_host_filters as it slowed down queries more than it helped 2025-06-06 23:35:25 -04:00
scripts fix typo in check_connect.js 2025-04-01 16:07:36 -04:00
src mark grouped notifs by oldest id - sort-of fix 1139 2025-07-03 14:16:20 +01:00
test merge: fix(backend): Send Abuse Reports To Set Maintainer E-Mail (!1127) 2025-06-19 15:54:55 +00:00
test-federation enable TypeScript incremental mode to speed up IDEs 2025-05-28 21:31:39 -04:00
test-server enable TypeScript incremental mode to speed up IDEs 2025-05-28 21:31:39 -04:00
.madgerc
.swcrc fix: swcのjson-schemaのurlを変更 (#15409) 2025-02-07 02:36:58 +00:00
eslint.config.js disable '@typescript-eslint/prefer-nullish-coalescing' for primitive types 2025-03-03 08:39:24 -05:00
jest.config.cjs
jest.config.e2e.cjs
jest.config.fed.cjs test(backend): add federation test (#14582) 2024-10-15 13:37:00 +09:00
jest.config.unit.cjs
jsconfig.json
ormconfig.js
package.json downgrade htmlparser2 to match cheerio 2025-06-12 21:18:52 -04:00
README.md
tsconfig.json enable TypeScript incremental mode to speed up IDEs 2025-05-28 21:31:39 -04:00

Misskey Backend