forked from FoundKeyGang/FoundKey
activitypub: properly handle all scopes for renotes
This was not implemented because of concerns raised in https://github.com/misskey-dev/misskey/issues/8261 about Mastodon incorrectly interpreting the scope on renotes. However this bug seems to be fixed so it can now be implemented. See also https://github.com/misskey-dev/misskey/pull/10291 Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
This commit is contained in:
parent
7a0c2acdf6
commit
1472c21cb6
1 changed files with 3 additions and 1 deletions
|
@ -13,8 +13,10 @@ export default (object: any, note: Note) => {
|
||||||
} else if (note.visibility === 'home') {
|
} else if (note.visibility === 'home') {
|
||||||
to = [`${attributedTo}/followers`];
|
to = [`${attributedTo}/followers`];
|
||||||
cc = ['https://www.w3.org/ns/activitystreams#Public'];
|
cc = ['https://www.w3.org/ns/activitystreams#Public'];
|
||||||
|
} else if (note.visibility === 'followers') {
|
||||||
|
to = [`${attributedTo}/followers`];
|
||||||
} else {
|
} else {
|
||||||
return null;
|
throw new Error('Invalid visibility for pure renote.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue