From 959c4258d3fc4e1a3dbc2611e4ae66462e78adf3 Mon Sep 17 00:00:00 2001 From: Emilis Date: Fri, 5 Aug 2022 08:25:04 +0100 Subject: [PATCH] fixed an error showing up when trying to renote a note in the 'home' visibility setting --- packages/backend/src/server/api/endpoints/notes/create.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 8d13fb483..a454d2125 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -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); } -- 2.43.0