summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLilly Schramm <privat@eps-dev.de>2025-06-18 20:25:32 +0200
committerLilly Schramm <privat@eps-dev.de>2025-06-18 20:25:32 +0200
commit372e141bcf133708c23368043d3fdda26f8890da (patch)
treeac681f1e521ebf88ca6ba5e7049861857714465e
parentfix(backend): Send Abuse Reports To Set Maintainer E-Mail (diff)
downloadsharkey-372e141bcf133708c23368043d3fdda26f8890da.tar.gz
sharkey-372e141bcf133708c23368043d3fdda26f8890da.tar.bz2
sharkey-372e141bcf133708c23368043d3fdda26f8890da.zip
refactor(backend): Resolve Nested Conditionals
-rw-r--r--packages/backend/src/core/AbuseReportNotificationService.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/backend/src/core/AbuseReportNotificationService.ts b/packages/backend/src/core/AbuseReportNotificationService.ts
index a67e5e19a7..307f22586e 100644
--- a/packages/backend/src/core/AbuseReportNotificationService.ts
+++ b/packages/backend/src/core/AbuseReportNotificationService.ts
@@ -93,10 +93,13 @@ export class AbuseReportNotificationService implements OnApplicationShutdown {
.filter(x => x != null),
);
- recipientEMailAddresses.push(
- ...(this.meta.email ? [this.meta.email] : []),
- ...(this.meta.maintainerEmail ? [this.meta.maintainerEmail] : []),
- );
+ if (this.meta.email) {
+ recipientEMailAddresses.push(this.meta.email);
+ }
+
+ if (this.meta.maintainerEmail) {
+ recipientEMailAddresses.push(this.meta.maintainerEmail);
+ }
return recipientEMailAddresses;
}