-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): check visibility of reactions of remote users #14383
base: develop
Are you sure you want to change the base?
Conversation
This reverts commit 32b1c3d.
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -76379,15 +76379,6 @@
}
}
},
- "IS_REMOTE_USER": {
- "value": {
- "error": {
- "message": "Currently unavailable to display reactions of remote users. See https://github.com/misskey-dev/misskey/issues/12964",
- "code": "IS_REMOTE_USER",
- "id": "6b95fa98-8cf9-2350-e284-f0ffdb54a805"
- }
- }
- },
"INVALID_PARAM": {
"value": {
"error": { |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #14383 +/- ##
===========================================
- Coverage 38.77% 38.75% -0.03%
===========================================
Files 1601 1601
Lines 203902 203999 +97
Branches 4011 4012 +1
===========================================
- Hits 79065 79061 -4
- Misses 124201 124302 +101
Partials 636 636 ☔ View full report in Codecov by Sentry. |
packages/backend/migration/1723208290742-remote-public-reactions-set-false.js
Outdated
Show resolved
Hide resolved
packages/backend/migration/1723208290742-remote-public-reactions-set-false.js
Show resolved
Hide resolved
misskey-dev#14383 (review) Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
followersVisibility, | ||
publicReactions, | ||
followingVisibility: followingIsPublic ? 'public' : followingIsPublic === false ? 'private' : undefined, | ||
followersVisibility: followersIsPublic ? 'public' : followersIsPublic === false ? 'private' : undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
followingIsPublic / followersIsPublic の型ってbooleanではない?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updatePerson()
では「"public"
にSET
する」、「"private"
にSET
する」、「UPDATE
しない」(リモートからの500
レスポンス等の一時的なエラーの場合)という3通りの選択肢を表現するのに{following,followers}IsPublic
の型をboolean | undefined
としています。
The `liked` collection is a list of objects liked by the actor, not the associated `Like` activities.
ユーザが行ったリアクションの総数の情報はAPIでも露出されていないように見えたので、それに合わせて |
CIの失敗は |
.limit(limit + 1) | ||
.orderBy('reaction.id', 'DESC') | ||
.innerJoinAndSelect('reaction.note', 'note') | ||
.distinctOn(['note.id']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noteの公開範囲 (非公開やフォロワー限定ではないか)
NoteがlocalOnlyか
NoteのUserが有効か (サスペンドや削除中ではないか)
あたりのフィルタは必要そう。
他の/users/:id
, /users/:id/*
あたりのUserフィルタも結構ガバガバそうだけどだわ…
でも私はliked生やして有無で判定するよりActorにプロパティ生やしちゃったほうがいいと思うのだわね。 |
独自プロパティでなく既存の仕組みを流用する利点としては、Misskey以外の実装との相互運用をより自然に(i.e. 独自プロパティを普及させるための政治的コストを負うことなく)行えるであろうという点を想定していますが、現状として |
f7489e7
to
f4ea906
Compare
(https://misskey.niri.la/notes/9x4nmu9qx7 でノートしたことをコピペ) コレクションへのアクセスが有るとhttpsリクエストがコレクションごとに一つ増えちゃうので following / followers 周りも含めて actor へのプロパティをはやしてそれをみんな見て、ない場合にのみlikedへのフォールバックする形ほうがネットワーク負荷と互換性の両面でそれなりに良さそうだと思いました。 mastodon等他のものが絶対追加しないって方針であればまた話が変わってくる可能性はありますがmisskeyはmisskey同士の連合も多いのでmisskey同士でも良さそうと漠然と考えています |
ネットワーク負荷の懸念については、発信側でコレクションオブジェクトがアクターのJSON-LD文書に埋め込まれている場合(e.g. ただ、 |
ちなみに0949c0eでは Footnotes
|
ローカルでは通るが、何故かCIでは通らないため。
一応連合テストを更新しましたが、 |
What
リモートユーザのプロフィールを取得する際にActivityPubアクターの
liked
コレクションの取得を試み、その内容が取得できる場合は当該ユーザのリアクションの一覧が公開設定であるものとしてデータベースに登録するようにします。(#14375の一般化)また、ローカルのActivityPubアクターに
liked
コレクションを実装し、ユーザがリアクションを送った投稿の一覧とリアクションの公開設定を連合できるようにします。Why
Resolves #12964.
Checklist