mizzkey/packages/backend
dakkar 417bb2d31e Never return broken notifications #409
Since notifications are stored in Redis, we can't expect relational
integrity: deleting a user will *not* delete notifications that
mention it.

But if we return notifications with missing bits (a `follow` without a
`user`, for example), the frontend will get very confused and throw an
exception while trying to render them.

This change makes sure we never expose those broken notifications. For
uniformity, I've applied the same logic to notes and roles mentioned
in notifications, even if nobody reported breakage in those cases.

Tested by creating a few types of notifications with a `notifierId`,
then deleting their user.

(cherry picked from commit 421f8d49e5d7a8dc3a798cc54716c767df8be3cb)
2024-02-13 15:21:30 +09:00
..
.vscode Update settings.json 2022-04-15 21:33:00 +09:00
assets Feat: 未読通知数を表示できるように (#11982) 2023-11-01 13:34:05 +09:00
migration update SPDX-FileCopyrightText 2024-02-12 11:37:45 +09:00
nsfw-model feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
src Never return broken notifications #409 2024-02-13 15:21:30 +09:00
test enhance: 禁止ワードはリモートノートも対象に (#13280) 2024-02-13 04:54:01 +09:00
test-server enhance(backend): テストの高速化 (#12939) 2024-01-08 17:43:52 +09:00
.eslintignore use eslint 2021-11-12 10:35:41 +09:00
.eslintrc.cjs test(server): add validation test of api:notes/create (#10090) 2023-02-26 11:28:05 +09:00
.madgerc Create .madgerc 2022-09-20 01:04:08 +09:00
.swcrc fix swcrc 2023-12-14 11:35:17 +09:00
check_connect.js update SPDX-FileCopyrightText 2024-02-12 11:37:45 +09:00
generate_api_json.js fix: api-docが開けない問題を修正 (#13132) 2024-02-02 12:47:07 +09:00
jest.config.cjs enhance(backend): テストの高速化 (#12939) 2024-01-08 17:43:52 +09:00
jest.config.e2e.cjs enhance(backend): テストの高速化 (#12939) 2024-01-08 17:43:52 +09:00
jest.config.unit.cjs enhance(backend): テストの高速化 (#12939) 2024-01-08 17:43:52 +09:00
jsconfig.json use eslint 2021-11-12 10:35:41 +09:00
ormconfig.js fix: postgre -> postgres (#9814) 2023-02-07 19:50:38 +09:00
package.json update deps 2024-02-09 17:10:16 +09:00
README.md chore: ✌️ 2022-12-24 14:39:17 +09:00
tsconfig.json update deps (#11764) 2023-09-04 13:33:38 +09:00
watch.mjs update SPDX-FileCopyrightText 2024-02-12 11:37:45 +09:00

Misskey Backend