From 2f0daf101c56217ce23ca9b37a8f36c60fbf3285 Mon Sep 17 00:00:00 2001 From: Flegma Date: Sat, 28 Mar 2026 09:14:46 +0100 Subject: [PATCH] fix: add Injectable decorator to MatchMapStatusEvent for proper DI Without @Injectable() on the child class, NestJS cannot generate design:paramtypes metadata for the child's constructor. It falls back to the parent's metadata (4 params), so the 5th param (NotificationsService) is never injected, causing a TypeError when sendMatchMapPauseNotification is called during match map pause events. --- src/matches/events/MatchMapStatusEvent.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/matches/events/MatchMapStatusEvent.ts b/src/matches/events/MatchMapStatusEvent.ts index 4665c9ad..fe75c3f7 100644 --- a/src/matches/events/MatchMapStatusEvent.ts +++ b/src/matches/events/MatchMapStatusEvent.ts @@ -2,10 +2,11 @@ import MatchEventProcessor from "./abstracts/MatchEventProcessor"; import { e_match_map_status_enum } from "../../../generated"; import { HasuraService } from "../../hasura/hasura.service"; import { MatchAssistantService } from "../match-assistant/match-assistant.service"; -import { Logger } from "@nestjs/common"; +import { Injectable, Logger, Scope } from "@nestjs/common"; import { ChatService } from "../../chat/chat.service"; import { NotificationsService } from "../../notifications/notifications.service"; +@Injectable({ scope: Scope.REQUEST }) export default class MatchMapStatusEvent extends MatchEventProcessor<{ status: e_match_map_status_enum; winning_lineup_id?: string;