don't return early -- should fix #626

I have no clue why I wrote that code 😭
This commit is contained in:
dakkar 2024-08-19 18:19:38 +01:00
parent f5560783ea
commit c4e0bea931

View file

@ -98,9 +98,9 @@ export class AbuseReportService {
const shouldForward = paramsMap.get(report.id)!.forward; const shouldForward = paramsMap.get(report.id)!.forward;
if (shouldForward && report.targetUserHost != null) { if (shouldForward && report.targetUserHost != null) {
return targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId })); targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId }));
} else { } else {
return targetUserMap.set(report.id, null); targetUserMap.set(report.id, null);
} }
} }