Sharkey/packages/backend/src
dakkar 421f8d49e5 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.
2024-02-11 12:25:50 +00:00
..
@types chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
boot merge: all upstream changes 2023-10-13 19:01:17 +02:00
core Never return broken notifications #409 2024-02-11 12:25:50 +00:00
daemons refactor(frontend): widgets/server-metric内の型エラーを除去 (#12937) 2024-01-07 23:56:46 +09:00
misc merge: upstream 2024-02-03 20:19:44 +01:00
models merge: upstream 2024-02-03 20:19:44 +01:00
queue merge: upstream 2024-02-03 20:19:44 +01:00
server fix: quote being returned as null instead of false on mastodon api 2024-02-05 19:38:00 +00:00
config.ts merge: upstream 2024-02-03 20:19:44 +01:00
const.ts make drive_file.comment larger 2023-10-02 13:47:35 +01:00
decorators.ts chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
di-symbols.ts merge: upstream (1) 2024-01-21 13:11:23 +01:00
env.ts chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
global.d.ts chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
GlobalModule.ts refactor: make sure promises are settled before app shutdown (#12942) 2024-01-08 12:28:13 +09:00
logger.ts chore(backend/logger): log data for every level if exists (#12863) 2024-01-02 16:52:51 +09:00
MainModule.ts chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
NestLogger.ts chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348) 2023-07-27 14:31:52 +09:00
postgres.ts merge: upstream (1) 2024-01-21 13:11:23 +01:00
types.ts merge: upstream 2024-01-22 19:58:43 +01:00