fix: reactions_not_public condition

This commit is contained in:
naskya 2023-10-31 14:00:54 +09:00
parent 267d1970e2
commit 70503d698f
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139

View File

@ -49,7 +49,7 @@ export const paramDef = {
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
const profile = await UserProfiles.findOneByOrFail({ userId: ps.userId }); 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); throw new ApiError(meta.errors.reactionsNotPublic);
} }