fixed an error showing up when trying to renote a note in the 'home' visibility setting
Some checks failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed

This commit is contained in:
Emilis 2022-08-05 08:25:04 +01:00
parent cbefddc071
commit 959c4258d3

View file

@ -206,8 +206,8 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.cannotReRenote);
}
// check that the visibility is not less restrictive
if (noteVisibilities.indexOf(renote.visibility) > noteVisibilities.indexOf(ps.visibility)) {
// do not allow renoting followers only/specified scope notes
if (noteVisibilities.indexOf(renote.visibility) > noteVisibilities.indexOf('home')) {
throw new ApiError(meta.errors.lessRestrictiveVisibility);
}