No description
Find a file
taichan 5f43c2faa2
enhance(backend): 通知がミュート・凍結を考慮するようにする (#13412)
* 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 421f8d49e5)

* Update Changelog

* Update CHANGELOG.md

* enhance: 通知がミュートを考慮するようにする

* enhance: 通知が凍結も考慮するようにする

* fix: notifierIdがない通知が消えてしまう問題

* Add tests (通知がミュートを考慮しているかどうか)

* fix: notifierIdがない通知が消えてしまう問題 (grouped)

* Remove unused import

* Fix: typo

* Revert "enhance: 通知が凍結も考慮するようにする"

This reverts commit b1e57e571dfd9a7d8b2430294473c2053cc3ea33.

* Revert API handling

* Remove unused imports

* enhance: Check if notifierId is valid in NotificationEntityService

* 通知作成時にpackしてnullになったらあとの処理をやめる

* Remove duplication of valid notifier check

* add filter notification is not null

* Revert "Remove duplication of valid notifier check"

This reverts commit 239a6952f717add53d52c3e701e7362eb1987645.

* Improve performance

* Fix packGrouped

* Refactor: 判定部分を共通化

* Fix condition

* use isNotNull

* Update CHANGELOG.md

* filterの改善

* Refactor: DONT REPEAT YOURSELF
Note: GroupedNotificationはNotificationの拡張なのでその例外だけ書けば基本的に共通の処理になり複雑な個別の処理は増えにくいと思われる

* Add groupedNotificationTypes

* Update misskey-js typedef

* Refactor: less sql calls

* refactor

* clean up

* filter notes to mark as read

* packed noteがmapなのでそちらを使う

* if (notesToRead.size > 0)

* if (notes.length === 0) return;

* fix

* Revert "if (notes.length === 0) return;"

This reverts commit 22e2324f9633bddba50769ef838bc5ddb4564c88.

* 🎨

* console.error

* err

* remove try-catch

* 不要なジェネリクスを除去

* Revert  (既読処理をpack内で行うものを元に戻す)

* Clean

* Update packages/backend/src/core/entities/NotificationEntityService.ts

* Update packages/backend/src/core/entities/NotificationEntityService.ts

* Update packages/backend/src/core/entities/NotificationEntityService.ts

* Update packages/backend/src/core/entities/NotificationEntityService.ts

* Update packages/backend/src/core/NotificationService.ts

* Clean

---------

Co-authored-by: dakkar <dakkar@thenautilus.net>
Co-authored-by: kakkokari-gtyih <daisho7308+f@gmail.com>
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2024-02-28 21:26:26 +09:00
.config feat: license violation protection (#13285) 2024-02-17 13:34:50 +09:00
.devcontainer Fix(backend): inboxJobPerSecのデフォルト値を16から32に (#12631) 2023-12-13 08:14:34 +09:00
.github chore(deps): bump actions/setup-node from 3.8.1 to 4.0.2 (#13307) 2024-02-16 16:33:01 +09:00
.okteto ok-to-test with okteto (#8799) 2022-06-09 00:50:23 +09:00
.vscode 設定を付けた & 設定自体をフォーマット (#12693) 2023-12-18 10:52:23 +09:00
assets cleanup: trim trailing whitespace (#11136) 2023-07-08 07:08:16 +09:00
chart chore(workflows): use postgres 15 everywhere (#12726) 2023-12-21 10:29:51 +09:00
cypress ci(test-frontend): Cypressのテストの失敗時、永遠に止まらない問題を回避 (MisskeyIO#434) (#13274) 2024-02-13 00:28:59 +09:00
fluent-emojis@cae981eb4c feat: introduce fluent emoji 2022-12-26 16:04:56 +09:00
locales enhance(backend): フォロー・フォロワー関連の通知の受信設定の強化 (#13468) 2024-02-28 09:49:34 +09:00
misskey-assets@0179793ec8 enhance(client): Sync widgets (#8512) 2022-12-27 14:55:11 +09:00
packages enhance(backend): 通知がミュート・凍結を考慮するようにする (#13412) 2024-02-28 21:26:26 +09:00
scripts feat: license violation protection (#13285) 2024-02-17 13:34:50 +09:00
.dockerignore feat: Introduce Meilisearch (#10755) 2023-05-05 08:52:14 +09:00
.dockleignore fix: aptのキャッシュを削除しないようにする (#9803) 2023-02-05 14:15:59 +09:00
.editorconfig cleanup: trim trailing whitespace (#11136) 2023-07-08 07:08:16 +09:00
.gitattributes 改行コードをLFに統一 (#9926) 2023-02-14 13:13:34 +09:00
.gitignore fix api-extractor 2024-01-20 14:01:27 +09:00
.gitmodules feat: introduce fluent emoji 2022-12-26 16:04:56 +09:00
.node-version update node to 20.10.0 2023-11-24 09:20:41 +09:00
.npmrc fix: .npmrcによりpackage.json記載のnodeバージョンに満たない場合はビルドに失敗するようにする (#12755) 2023-12-23 15:32:31 +09:00
.vsls.json Add .vsls.json 2018-08-13 00:24:45 +09:00
CHANGELOG.md enhance(backend): 通知がミュート・凍結を考慮するようにする (#13412) 2024-02-28 21:26:26 +09:00
CODE_OF_CONDUCT.md docs: Update Code of Conduct to version 2.1 (#12150) 2023-11-13 16:52:54 +09:00
codecov.yml Update codecov.yml 2023-02-26 14:17:29 +09:00
CONTRIBUTING.md chore: 以前の開発環境(backendにアクセスする方式)を立ち上げられるように (#13220) 2024-02-13 00:54:34 +09:00
COPYING 2024 2024-01-01 00:30:56 +09:00
crowdin.yml ドキュメントをmisskey-hubに移行 2021-11-05 16:18:52 +09:00
cypress.config.ts update cypress 2022-06-11 15:53:45 +09:00
docker-compose.local-db.yml chore: 開発モードでフロントエンドとバックエンドを独立して起動するようにする(再) (#12593) 2023-12-08 08:22:08 +09:00
docker-compose_example.yml feat: Add support for mCaptcha (#12905) 2024-01-06 20:14:33 +09:00
Dockerfile fix of #13330 (#13330) 2024-02-16 16:49:12 +09:00
healthcheck.sh (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
LICENSE Use AGPLv3 2018-03-28 22:56:28 +09:00
package.json 2024.2.0 2024-02-17 13:41:24 +09:00
pnpm-lock.yaml fix: SSR時のmetaをエスケープするように (#13440) 2024-02-23 14:10:13 +09:00
pnpm-workspace.yaml refactor: extract bubble-game engine as independent package 2024-01-20 09:53:26 +09:00
Procfile Create Procfile 2019-04-05 18:17:30 +09:00
README.md [Hub Next] Misskey Hubのリンクを変更 (#12699) 2023-12-22 20:16:31 +09:00
ROADMAP.md Update ROADMAP.md 2024-01-04 08:44:38 +09:00
SECURITY.md Update SECURITY.md 2023-12-25 16:50:41 +09:00

Misskey logo

🌎 Misskey is an open source, decentralized social media platform that's free forever! 🚀


find an instance create an instance become a contributor join the community become a patron

codecov

Features

  • ActivityPub support
    Not on Misskey? No problem! Not only can Misskey instances talk to each other, but you can make friends with people on other networks like Mastodon and Pixelfed!
  • Reactions
    You can add emoji reactions to any post! No longer are you bound by a like button, show everyone exactly how you feel with the tap of a button.
  • Drive
    With Misskey's built in drive, you get cloud storage right in your social media, where you can upload any files, make folders, and find media from posts you've made!
  • Rich Web UI
    Misskey has a rich and easy to use Web UI! It is highly customizable, from changing the layout and adding widgets to making custom themes. Furthermore, plugins can be created using AiScript, an original programming language.
  • And much more...

Documentation

Misskey Documentation can be found at Misskey Hub, some of the links and graphics above also lead to specific portions of it.

Sponsors

RSS3

Thanks

Chromatic

Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.

Codecov

Thanks to Codecov for providing the code coverage platform that helps us improve our test coverage.

Crowdin

Thanks to Crowdin for providing the localization platform that helps us translate Misskey into many languages.

Docker

Thanks to Docker for providing the container platform that helps us run Misskey in production.