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

リストタイムラインでミュートが貫通してしまう問題に対処 #12534

Merged
merged 7 commits into from
Dec 3, 2023

Conversation

samunohito
Copy link
Member

What

#10443 の対処です。
この対応により、リストタイムラインにてユーザミュート、サーバミュートが機能するようになり、
チャンネル投稿がストリーミングに流れなくなります。

もとのIssueでは

チャンネル投稿
→考慮する。自分がフォローしていないチャンネルに対しての投稿はリストに流さない

…とまとめていますが、チャンネル投稿は元々リロード時やFTT有効時の読み込み対象としない意図が明示されている実装がありましたため、チャンネル投稿は含めない形としています。
(なのでストリーミング側でチャンネル投稿が漏れるのを塞ぐ方針で対応)

Why

fix #10443

Additional info (optional)

ユーザミュートとチャンネル投稿についてはローカルで確認しました。
サーバミュートについては、連合に参加している環境が手元になく確認できていません。

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 the packages/backend Server side specific issue/PR label Dec 1, 2023
Copy link
Contributor

github-actions bot commented Dec 1, 2023

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

差分はこちら

Get diff files from Workflow Page

@@ -135,8 +138,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser')
.leftJoinAndSelect('note.channel', 'channel');
.leftJoinAndSelect('renote.user', 'renoteUser');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

チャンネル投稿はそもそもuserListTimelineに配信されていないように見受けられるので省きました

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3364162) 78.73% compared to head (3daf4c7) 78.77%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12534      +/-   ##
===========================================
+ Coverage    78.73%   78.77%   +0.03%     
===========================================
  Files          952      952              
  Lines       103602   103619      +17     
  Branches      8328     8345      +17     
===========================================
+ Hits         81573    81621      +48     
+ Misses       22029    21998      -31     

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

@@ -69,6 +70,7 @@ export default class Connection {
this.userIdsWhoMeMuting = userIdsWhoMeMuting;
this.userIdsWhoBlockingMe = userIdsWhoBlockingMe;
this.userIdsWhoMeMutingRenotes = userIdsWhoMeMutingRenotes;
this.userMutedInstances = new Set(userProfile.mutedInstances);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

userProfileのキャッシュは独立して存在していますが、ストリーミングの頻度で毎度Setを作るのも無駄な気がしたのでSetを作成してキャッシュしています

@samunohito samunohito marked this pull request as ready for review December 1, 2023 07:59
@syuilo
Copy link
Member

syuilo commented Dec 2, 2023

ストリーミング部分のテストも追加してもらえるといいかもしれません🙏

# Conflicts:
#	packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts
@samunohito
Copy link
Member Author

@syuilo

ストリーミング部分のテストも追加

31f471c を追加してきました。この意味でよさそうですか…!?

@syuilo syuilo merged commit c68d875 into misskey-dev:develop Dec 3, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Dec 3, 2023

👍👍👍

camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
* ユーザリストTL系の各種動作を修正・統一

* fix

* fix CHANGELOG.md

* テスト追加
@samunohito samunohito deleted the fix/10443-user-list-tl-fix branch January 11, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

リストタイムラインが殆どのミュートを貫通する
2 participants