activitypub: properly handle all scopes for renotes
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
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') {
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue