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(ap): Use unique identifier for each follow request #10600

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

hutchisr
Copy link
Contributor

@hutchisr hutchisr commented Apr 12, 2023

Fix #9250
Fix #10041

What

Uses unique identifier for each new follow request even if it is for the same follower/followee and adds api endpoint to retrieve activity using this identifier.

Why

Fixes federation with pleroma where user cannot follow after unfollowing/being removed as follower and complies with activitypub spec requiring each activity to have unique id

See: #9250, #10041

Additional info (optional)

Test following, unfollowing, following again an account using pleroma

Checklist

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

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Apr 12, 2023
@github-actions github-actions bot requested review from acid-chicken and syuilo April 12, 2023 09:11
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #10600 (a741631) into develop (e3aeab8) will increase coverage by 2.34%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop   #10600      +/-   ##
===========================================
+ Coverage    76.07%   78.42%   +2.34%     
===========================================
  Files          894      164     -730     
  Lines        88159    20320   -67839     
  Branches      6227      359    -5868     
===========================================
- Hits         67066    15935   -51131     
+ Misses       21093     4385   -16708     

see 730 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tamaina tamaina changed the title fix: Use unique identifier for each follow request fix(ap): Use unique identifier for each follow request Apr 12, 2023
@tamaina
Copy link
Contributor

tamaina commented Apr 12, 2023

Lint failed (I will fix

@tamaina
Copy link
Contributor

tamaina commented Apr 12, 2023

PRに関係なかった

@tamaina tamaina merged commit b7d056f into misskey-dev:develop Apr 12, 2023
@tamaina
Copy link
Contributor

tamaina commented Apr 12, 2023

🙏🙏🙏

@trwnh
Copy link
Contributor

trwnh commented Apr 12, 2023

Does this actually fix #9250? I don't see the code touching the Accept/Reject logic...

@hutchisr
Copy link
Contributor Author

hutchisr commented Apr 12, 2023

Does this actually fix #9250? I don't see the code touching the Accept/Reject logic...

Hmm on second passthrough it doesn't look like it fixes it in all cases. remove/re-add works from the pleroma side but removing a follower from misskey still doesn't register on pleroma (though on pleroma side if the user clicks unfollow/refollow they will be able to follow again now). Will try to make another PR to fix this.

Ry0taK pushed a commit to MisskeyIO/misskey that referenced this pull request Apr 13, 2023
* Refactor sw (misskey-dev#10579)

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): 冗長な部分を変更

* refactor(sw): 使われていない煩雑な機能を削除

* refactor(sw): remove dead code

* refactor(sw): URL文字列の作成に`URL`を使うように

* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処

* refactor(sw): `append` -> `set` in `URLSearchParams`

* refactor(sw): `any`の削除とそれに伴い露呈したエラーへの対処

* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処

対処と言っても`throw`するだけ。いままでもこの状況ではエラーが投げられていたはずなので、この対処により新たな問題が起きることはないはず。

* refactor(sw): i18n loading

* refactor(sw): 型推論がうまくできる書き方に変更

`codes`が`(string | undefined)[]`から`string[]`になった

* refactor(sw): クエリ文字列の作成に`URLSearchParams`を使うように

* refactor(sw): `findClient`

* refactor(sw): `openClient`における`any`や`as`の書き換え

* refactor(sw): `openPost`における`any`の書き換え

* refactor(sw): `let` -> `const`

* refactor(sw): `any` -> `unknown`

* cleanup(sw): import

* cleanup(sw)

* cleanup(sw): `?.`

* cleanup(sw/.eslintrc.js)

* refactor(sw): `@typescript-eslint/explicit-function-return-type`

* refactor(sw): `@typescript-eslint/no-unused-vars`

* refactor(sw): どうしようもないところに`eslint-disable-next-line`を

* refactor(sw): `import/no-default-export`

* update operations.ts

* throw new Error

---------

Co-authored-by: tamaina <[email protected]>

* Update CHANGELOG.md (misskey-dev#10591)

* feat: queueing bulk follow/unfollow and block/unblock (misskey-dev#10544)

* wrap follow/unfollow and block/unblock as job queue

* create import job to follow in each iteration

* make relationship jobs concurrent

* replace to job queue if called repeatedly

* use addBulk to import

* omit stream when importing

* fix job caller

* use ThinUser instead of User to reduce redis memory consumption

* createImportFollowingToDbJobの呼び出し方を変える, 型補強

* Force ThinUser

* オブジェクト操作のみのメソッド名はgenerate...Data

* Force ThinUser in generateRelationshipJobData

* silent bulk unfollow at admin api endpoint

---------

Co-authored-by: tamaina <[email protected]>

* perf(backend): ノート作成時のアンテナ追加パフォーマンスを改善

* update CHANGELOG.md

* refactor: サウンド関連の設定をpizzaxに移行 (misskey-dev#8105)

* enhane: unison-reloadに指定したパスに移動できるように

* null

* null

* feat: ログインするアカウントのIDをクエリ文字列で指定する機能

* null

* await?

* rename

* rename

* Update read.ts

* merge

* get-note-summary

* fix

* swパッケージに

* add missing packages

* fix getNoteSummary

* add webpack-cli

* ✌️

* remove plugins

* sw-inject分離したがテストしてない

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix

* ✌️

* clean up config

* typesを戻した

* backend/src/web/index.ts

* notification-badges

* add scripts

* change create-notification.ts

* Update packages/client/src/components/notification.vue

Co-authored-by: Acid Chicken (硫酸鶏) <[email protected]>

* disconnect

* oops

* Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた

* truncate notification

* Update packages/client/src/ui/_common_/common.vue

Co-authored-by: syuilo <[email protected]>

* clean up

* clean up

* refactor

* キャッシュ対策

* Truncate push notification message

* fix

* wip

* clean up

* migration

* migration

* comment

* move soundConfigStore

* ✌️

* clean up

* クライアントがあったらストリームに接続しているということなので通知しない判定の位置を修正

* components/drive-file-thumbnail.vue

* components/drive-select-dialog.vue

* components/drive-window.vue

* merge

* fix

* remove reversi setting

* Service Workerのビルドにesbuildを使うようにする

* return createEmptyNotification()

* fix

* fix

* i18n.ts

* update

* ✌️

* remove ts-loader

* fix

* fix

* enhance: Service Workerを常に登録するように

* pollEnded

* pollEnded

* URLをsw.jsに戻す

* clean up

* clean up

* update sounds.vue

* update

* fix type

* ✌️

* ;v;

---------

Co-authored-by: Acid Chicken (硫酸鶏) <[email protected]>
Co-authored-by: syuilo <[email protected]>

* enhance: カスタム絵文字関連の変更 (misskey-dev#9794)

* PackedNoteなどのemojisはプロキシしていないURLを返すように

* MFMでx3/x4もしくはscale.x/yが2.5以上に指定されていた場合にはオリジナル品質の絵文字を使用する

* update CHANGELOG.md

* fix changelog

* ??

* wip

* fix

* merge

* Update packages/frontend/src/scripts/media-proxy.ts

Co-authored-by: syuilo <[email protected]>

* merge

* calc scale

---------

Co-authored-by: syuilo <[email protected]>

* feat: role timeline

Resolve misskey-dev#10581

* feat(server): Misskey Webでユーザーフレンドリーなエラーページを出す (misskey-dev#10590)

* (add) user-friendly error page

* Update CHANGELOG.md

* (add) cache-control header

* Add ClientLoggerService

* Log params and query

* remove error stack on client

* fix pug

* 文面を調整

* :art]

---------

Co-authored-by: tamaina <[email protected]>

* test(backend): Add tests for users (misskey-dev#10546)

Co-authored-by: tamaina <[email protected]>

* fix(backend): カスタム絵文字でリアクションできないことがある問題を修正

* Update CustomEmojiService.ts

* fix type

* Use unique identifier for each follow request (misskey-dev#10600)

Co-authored-by: anemone <[email protected]>

* fix type in CustomEmojiService

* fix type in CustomEmojiService 2

* fix

* Update CHANGELOG.md

* fix(server): アンテナとロールTLのuntil/sinceプロパティが動くように (misskey-dev#10605)

* fix(server): アンテナとロールTLのuntil/sinceプロパティが動くように

* fix

* Update CHANGELOG.md

* Update about-misskey.vue

* 🎨

* fix(backend): チャンネルのピン留めされたノートの順番が正しくない問題を修正

Fix misskey-dev#10541

* New Crowdin updates (misskey-dev#10585)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (Japanese, Kansai)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Italian)

* New translations ja-JP.yml (Italian)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Japanese, Kansai)

* New translations ja-JP.yml (Chinese Simplified)

* 13.11.3

* [ci skip] remove outdated comment

* [ci skip] improve readability

* 一部の Workflow を削除

---------

Co-authored-by: okayurisotto <[email protected]>
Co-authored-by: tamaina <[email protected]>
Co-authored-by: futchitwo <[email protected]>
Co-authored-by: Namekuji <[email protected]>
Co-authored-by: syuilo <[email protected]>
Co-authored-by: Acid Chicken (硫酸鶏) <[email protected]>
Co-authored-by: kakkokari-gtyih <[email protected]>
Co-authored-by: Nanashia <[email protected]>
Co-authored-by: hutchisr <[email protected]>
Co-authored-by: anemone <[email protected]>
Co-authored-by: Ebise Lutica <[email protected]>
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
3 participants