From 70503d698f02963048c0205490b8f37e64167f4c Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 31 Oct 2023 14:00:54 +0900 Subject: [PATCH] fix: reactions_not_public condition --- packages/backend/src/server/api/endpoints/users/reactions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 3c0e33b2f6..483a78865f 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -49,7 +49,7 @@ export const paramDef = { export default define(meta, paramDef, async (ps, me) => { const profile = await UserProfiles.findOneByOrFail({ userId: ps.userId }); - if (me.id !== ps.userId && !profile.publicReactions) { + if (!profile.publicReactions && (me == null || me.id !== ps.userId)) { throw new ApiError(meta.errors.reactionsNotPublic); }