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

feat: サーバーサイレンス機能を追加 #12031

Merged
merged 23 commits into from
Oct 16, 2023
Merged

feat: サーバーサイレンス機能を追加 #12031

merged 23 commits into from
Oct 16, 2023

Conversation

mattyatea
Copy link
Member

What

サーバーサイレンス機能が追加されました。
サーバーサイレンスされたサーバーからフォローが飛んでくると全てフォローリクエストになります。

サーバー側

  • admin/meta のレスポンスに silencedHosts が追加されました。
  • federation/show-instance のレスポンスに isSilenced が追加されました。
  • admin/update-meta に silencedHosts を含めることでサーバーサイレンスができます。

クライアント側

  • about#federation で Status: isSilenced が追加されました
    image
    image
    image
  • instance-info でサイレンスをswitchできます
    image

Why

無差別フォローなどの問題に柔軟に対応できるようにという意図です。

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 packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Oct 14, 2023
@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

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

Comparison is base (3ebed5a) 79.08% compared to head (a3d5a56) 79.35%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12031      +/-   ##
===========================================
+ Coverage    79.08%   79.35%   +0.26%     
===========================================
  Files          174      930     +756     
  Lines        22706    99219   +76513     
  Branches       485     8095    +7610     
===========================================
+ Hits         17957    78735   +60778     
- Misses        4749    20484   +15735     
Files Coverage Δ
packages/backend/src/core/UserFollowingService.ts 74.21% <100.00%> (ø)
packages/backend/src/core/UtilityService.ts 95.00% <100.00%> (ø)
packages/backend/src/models/Meta.ts 100.00% <100.00%> (ø)
...kend/src/models/json-schema/federation-instance.ts 100.00% <100.00%> (ø)
...backend/src/core/entities/InstanceEntityService.ts 44.06% <50.00%> (ø)
...ges/backend/src/server/api/endpoints/admin/meta.ts 77.90% <90.90%> (ø)
packages/backend/src/core/NoteCreateService.ts 89.04% <75.00%> (ø)
...kend/src/server/api/endpoints/admin/update-meta.ts 65.24% <82.50%> (ø)
...d/src/server/api/endpoints/federation/instances.ts 39.10% <5.55%> (ø)

... and 747 files with indirect coverage changes

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

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Oct 14, 2023

$ cd packages/misskey-js

$ pnpm build

$ pnpm api

でAPI Extractorを回してください(Checkが通るようになります)🙏

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Oct 14, 2023

Lintも落ちてるので書式の方も修正が必要そうです…🙏

https://github.com/misskey-dev/misskey/actions/runs/6516341356/job/17699763572?pr=12031

https://github.com/misskey-dev/misskey/actions/runs/6516341356/job/17699763448?pr=12031

ここにどのファイルの何がいけないのかが載っているのでそれを参考に書式を正してください(VSCodeの場合はeslint拡張機能を入れるのもアリ)

@mattyatea
Copy link
Member Author

ここまでにあげられたものは全て修正したと思われます...🙏

@syuilo
Copy link
Member

syuilo commented Oct 16, 2023

「フォローが飛んでくると全てフォローリクエストになる状態」であればサイレンスという名称は合ってない気がするわね

@mattyatea
Copy link
Member Author

実装漏れありました
サイレンスされてるサーバーからの公開投稿はホーム行きになる
もあります
これがあればサイレンスと言えるのではないかと考えてます👀

@syuilo
Copy link
Member

syuilo commented Oct 16, 2023

テストが失敗しているわね
https://github.com/misskey-dev/misskey/actions/runs/6531754895/job/17733575481?pr=12031

@syuilo syuilo merged commit 5efd01b into misskey-dev:develop Oct 16, 2023
15 checks passed
@syuilo
Copy link
Member

syuilo commented Oct 16, 2023

🙏🏻 🙏🏻

@robflop
Copy link
Contributor

robflop commented Oct 16, 2023

@mattyatea (英語ストリングが含まれているので以下を英語で書きます。)

FYI: If you modify locale files other than the japanese one outside of Crowdin (e.g. in a PR like this), those translations will not actually show up on Crowdin, and be overwritten by those written on Crowdin later on.

Instead, if you'd like to provide translations for those, it would be better if you first waited for the PR to be merged, and then supplied the translations on Crowdin yourself.
Alternatively (if you don't have a Crowdin account), you can also ping me in the PR thread once it has been merged with the text you want the fields to have in english, and I can put those up for you. Please don't mention me for languages that are not english or german, however, as I don't work on those.

(Context: I manage the english and german translations of Misskey.)

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 packages/misskey-js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants