Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter User / Instance Mutes in FanoutTimelineEndpointService #12565

Merged
merged 13 commits into from
Dec 4, 2023

Conversation

anatawa12
Copy link
Member

@anatawa12 anatawa12 commented Dec 3, 2023

What

FanoutTimelineEndpointService内でUser / Instance Muteを確認することでFanoutTimelineEndpointServiceを使用してる各種エンドポイントでミュートが聞かない問題を発生しなくします。

Fixes some part of #11921

Why

将来的なミュート種別追加時に忘れなくなる。
実際にいくつかのendpointではインスタンスミュートが機能していませんでした。

Additional info (optional)

実装時に若干困ったので&元々正しく動いていなかったので withReplieswithFiles 両方指定するのを禁止しました。

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR labels Dec 3, 2023
Copy link

codecov bot commented Dec 3, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (b2c4973) 78.74% compared to head (1355f7c) 78.78%.

Files Patch % Lines
.../backend/src/core/FanoutTimelineEndpointService.ts 96.00% 3 Missing ⚠️
...kend/src/server/api/endpoints/channels/timeline.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12565      +/-   ##
===========================================
+ Coverage    78.74%   78.78%   +0.04%     
===========================================
  Files          954      957       +3     
  Lines       103825   104007     +182     
  Branches      8350     8327      -23     
===========================================
+ Hits         81753    81941     +188     
+ Misses       22072    22066       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 3, 2023

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -46407,6 +46407,15 @@
                       }
                     }
                   },
+                  "BOTH_WITH_REPLIES_AND_WITH_FILES": {
+                    "value": {
+                      "error": {
+                        "message": "Specifying both withReplies and withFiles is not supported",
+                        "code": "BOTH_WITH_REPLIES_AND_WITH_FILES",
+                        "id": "dfaa3eb7-8002-4cb7-bcc4-1095df46656f"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -46601,6 +46610,15 @@
                       }
                     }
                   },
+                  "BOTH_WITH_REPLIES_AND_WITH_FILES": {
+                    "value": {
+                      "error": {
+                        "message": "Specifying both withReplies and withFiles is not supported",
+                        "code": "BOTH_WITH_REPLIES_AND_WITH_FILES",
+                        "id": "dd9c8400-1cb5-4eef-8a31-200c5f933793"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -60132,6 +60150,15 @@
                       }
                     }
                   },
+                  "BOTH_WITH_REPLIES_AND_WITH_FILES": {
+                    "value": {
+                      "error": {
+                        "message": "Specifying both withReplies and withFiles is not supported",
+                        "code": "BOTH_WITH_REPLIES_AND_WITH_FILES",
+                        "id": "91c8cb9f-36ed-46e7-9ca2-7df96ed6e222"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {

Get diff files from Workflow Page

@anatawa12
Copy link
Member Author

frontendのtestは ed89e31 時点でうちのブランチでは通ってるので re-run で通っったりしないかな

https://github.com/anatawa12/misskey/actions/runs/7077278167/job/19261446358

@syuilo syuilo merged commit 18109fc into misskey-dev:develop Dec 4, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Dec 4, 2023

🙏🙏

@anatawa12 anatawa12 deleted the filter-mutes-in-service branch December 4, 2023 06:34
@tamaina
Copy link
Contributor

tamaina commented Dec 5, 2023

MkMenu > switchItemでitem.disabledがundefinedの場合が考慮されてない気がする

@tamaina tamaina mentioned this pull request Dec 5, 2023
@anatawa12
Copy link
Member Author

ごめんなさい。考慮し忘れてて #12577 で対応してもらっているようです。

camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
…y-dev#12565)

* fix: unnecessary logging in FanoutTimelineEndpointService

* chore: TimelineOptions

* chore: add FanoutTimelineName type

* chore: forbid specifying both withReplies and withFiles since it's not implemented correctly

* chore: filter mutes, replies, renotes, files in FanoutTimelineEndpointService

* revert unintended changes

* use isReply in NoteCreateService

* fix: excludePureRenotes is not implemented

* fix: replies to me is excluded from local timeline

* chore(frontend): forbid enabling both withReplies and withFiles

* docs(changelog): インスタンスミュートが効かない問題の修正について言及
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants