リアクション履歴が公開なら、ログインしていなくても表示できるように (#9728)

This commit is contained in:
hayabusa 2023-01-26 16:10:32 +09:00 committed by GitHub
parent 1959cb462b
commit b21064ffa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: ps.userId }); const profile = await this.userProfilesRepository.findOneByOrFail({ userId: ps.userId });
if (me == null || (me.id !== ps.userId && !profile.publicReactions)) { if ((me == null || me.id !== ps.userId) && !profile.publicReactions) {
throw new ApiError(meta.errors.reactionsNotPublic); throw new ApiError(meta.errors.reactionsNotPublic);
} }