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:
Johann150 2023-03-31 07:59:20 +02:00
parent 7a0c2acdf6
commit 1472c21cb6
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -13,8 +13,10 @@ export default (object: any, note: Note) => {
} else if (note.visibility === 'home') {
to = [`${attributedTo}/followers`];
cc = ['https://www.w3.org/ns/activitystreams#Public'];
} else if (note.visibility === 'followers') {
to = [`${attributedTo}/followers`];
} else {
return null;
throw new Error('Invalid visibility for pure renote.');
}
return {