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

fix(backend): ブロックした相手から自分のノートが見えないように(/users/featured-notes, /users/notes) #12511

Merged
merged 19 commits into from
Dec 7, 2023

Conversation

kanarikanaru
Copy link
Contributor

@kanarikanaru kanarikanaru commented Nov 29, 2023

What

/users/featured-notes, /users/notesのFTT有効時に被ブロック判定を追加し、特定のユーザーにブロックされている場合にブロックを行ったユーザーのノートを含んで返さないようにしました。

Why

FTTが導入されてから、Redisにキャッシュされたノートに限定して起きる問題です。

ユーザー1が、ユーザー2をブロックしたとして、
ユーザー2からは、ユーザー1のノートが、ユーザー画面では閲覧できるようになっていたため。

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 Nov 29, 2023
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

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

Comparison is base (8866c53) 78.76% compared to head (dff81e7) 78.75%.

Files Patch % Lines
...d/src/server/api/endpoints/users/featured-notes.ts 16.66% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12511      +/-   ##
===========================================
- Coverage    78.76%   78.75%   -0.01%     
===========================================
  Files          955      955              
  Lines       103873   103889      +16     
  Branches      8337     8332       -5     
===========================================
+ Hits         81814    81819       +5     
- Misses       22059    22070      +11     

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

Copy link
Contributor

github-actions bot commented Nov 29, 2023

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

差分はこちら

Get diff files from Workflow Page

@kanarikanaru kanarikanaru changed the title fix: ブロックした相手から自分のノートが見えないように(ユーザー,チャンネル) fix(backend): ブロックした相手から自分のノートが見えないように(ユーザー,チャンネル) Nov 30, 2023
@kanarikanaru
Copy link
Contributor Author

運営しているBackspaceKeyで適用しましたが、特に問題なく動いています。

@kanarikanaru kanarikanaru changed the title fix(backend): ブロックした相手から自分のノートが見えないように(ユーザー,チャンネル) fix(backend): ブロックした相手から自分のノートが見えないように(/users/featured-notes, /users/notes) Dec 4, 2023
- ブロックされている場合は、/users/notesでノートが表示されない
- ミュートしている場合は、ノートが表示される
@anatawa12
Copy link
Member

@syuilo こちらも確認していただけないでしょうか。何度も、また他人のPRでpingすみません。

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

syuilo commented Dec 7, 2023

🙏🏻 🙏🏻

@kanarikanaru kanarikanaru deleted the note-visibility branch December 7, 2023 12:43
camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
…notes) (misskey-dev#12511)

* fix: ブロックした相手から自分のノートが見えないように(ユーザー,チャンネル)

* Update CHANGELOG.md

* /users/featured-notesでもブロックを考慮するように

* cacheServiceを使うように

* /channels/timeline.tsで必要のないnoteFilterを持たないように

* Update CHANGELOG.md

* FanoutTimelineEndpointServiceへの対応

- ブロックされている場合は、/users/notesでノートが表示されない
- ミュートしている場合は、ノートが表示される
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants