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

AP audience (visibility) パースの修正 #5783

Merged
merged 6 commits into from
Jan 30, 2020

Conversation

mei23
Copy link
Contributor

@mei23 mei23 commented Jan 29, 2020

Summary

Fix #4951
Resolve #5768
Resolve #5078
Resolve #5767

  • audience (visibility) あたりのリファクタ (#4951のPublic表現の修正含む)
  • Create => Note, Image ... 等で、Note等のObjectにaudience (to, cc) がない場合は、
    Activity の audience を見に行くように
  • Reply, Renote 等でNote等をremoteに取得しに行った場合に audience がない場合は、
    匿名で取得できたのならば公開されているものに違いないとみなして public 扱いにするように。

@mei23 mei23 requested review from syuilo and acid-chicken January 29, 2020 10:20
visibleUsers = activityAudience.visibleUsers;
apMentions = activityAudience.mentionedUsers;
} else if (typeof value === 'string') { // 入力がstringならばresolverでGETが発生している
// こちらから匿名GET出来たものならばpublic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

フォールバックとしては home がより妥当かなという気がしますが、どうでしょうか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

公開範囲=未定義 ってことなのでなんともいえない

最初homeが無難かなとも思ったのですが
元々公開するための仕組みで公開範囲の概念がないのがデフォルトなのでpublicでいいかなと思いました。

あとhomeにすると、それを参照するRenote/Reply自体の公開範囲が常にhomeになっちゃいます。

src/remote/activitypub/audience.ts Outdated Show resolved Hide resolved
src/remote/activitypub/audience.ts Outdated Show resolved Hide resolved
mei23 and others added 2 commits January 29, 2020 22:42
Co-Authored-By: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-Authored-By: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
@syuilo syuilo merged commit 711aa56 into misskey-dev:develop Jan 30, 2020
@syuilo
Copy link
Member

syuilo commented Jan 30, 2020

ありがとうございます 🙏

function isPublic(id: string) {
return [
'https://www.w3.org/ns/activitystreams#Public',
'as#Public',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as:Publicの間違えだった #11347

return [
'https://www.w3.org/ns/activitystreams#Public',
'as#Public',
'Public',
Copy link
Contributor Author

@mei23 mei23 May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ (Public) いらない疑惑

Copy link
Contributor Author

@mei23 mei23 May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

元IssueにはPublicを認識させろとまでは言ってないし
https://www.w3.org/TR/activitypub/#x5-6-public-addressing

いやそんなことなさそうだしうーん

being represented as simply Public or as:Public

Compactしてもas:Publicだし
Publicが来てもCanonize でエラーになるし

jsonld.ValidationError: Safe mode validation error.
{
  "type": [
    "JsonLdEvent"
  ],
  "code": "relative object reference",
  "level": "warning",
  "message": "Relative object reference found.",
  "details": {
    "object": "Public"
  }
}

JSON-LD Playground ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants