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

enhance(backend): headタグ内にrel=alternateの指定のあるlinkタグがある場合、記述されたURLを参照して照会できるように #14371

Merged
merged 8 commits into from
Aug 17, 2024

Conversation

tai-cha
Copy link
Contributor

@tai-cha tai-cha commented Aug 6, 2024

What

ThreadsのようなHTMLのheadタグ内に<link rel="alternate" href="https://example.com/activity/json/path/" type="application/activity+json">のようなタグがある場合にそちらを追って照会できるように

Why

resolve: #14348

Additional info (optional)

DOMを見るのでパフォーマンス上の懸念はある
リファクタの余地もあるかも(とりあえず動作確認はできた)

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 Aug 6, 2024
@tai-cha

This comment was marked as resolved.

Copy link
Contributor

github-actions bot commented Aug 6, 2024

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

差分はこちら

Get diff files from Workflow Page

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.

Project coverage is 39.87%. Comparing base (fd744f4) to head (d0a9118).
Report is 3 commits behind head on develop.

Files Patch % Lines
...s/backend/src/core/activitypub/ApRequestService.ts 4.54% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14371      +/-   ##
===========================================
- Coverage    41.61%   39.87%   -1.74%     
===========================================
  Files         1551     1547       -4     
  Lines       196905   190875    -6030     
  Branches      2772     3552     +780     
===========================================
- Hits         81941    76116    -5825     
+ Misses      114400   114167     -233     
- Partials       564      592      +28     

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

@tai-cha tai-cha force-pushed the feat/ap_show_alternate branch from c5c5602 to b15133c Compare August 6, 2024 14:38
@syuilo
Copy link
Member

syuilo commented Aug 9, 2024

テスト追加できたりするかしら

@tai-cha
Copy link
Contributor Author

tai-cha commented Aug 9, 2024

APのSignedGetだからどうテスト書けばいいか悩んでいる (方針さえわかればかける)(というかそれがわからずテストを書いていないまであります)

ダミーのサイトもう一つ用意するようなテストになる?

@syuilo
Copy link
Member

syuilo commented Aug 9, 2024

なんかモックできたような気がする

@syuilo syuilo merged commit 9fbc1b7 into misskey-dev:develop Aug 17, 2024
12 of 17 checks passed
@syuilo
Copy link
Member

syuilo commented Aug 17, 2024

👍🏻

LemonDouble pushed a commit to LemonDouble/misskey that referenced this pull request Aug 19, 2024
…て照会できるように (misskey-dev#14371)

* signedGet時にhttpかつalternate属性のlinkがある場合に一回だけfollowして照会する

* Fix: validation position

* Fix import

* Fix tagname

* Update CHANGELOG

* Fix code style

---------

Co-authored-by: syuilo <[email protected]>
u1-liquid pushed a commit to MisskeyIO/misskey that referenced this pull request Dec 24, 2024
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
2 participants