@@ -10,6 +10,7 @@ import { DiscordBotOverviewService } from "../discord-bot/discord-bot-overview/d
1010import { DiscordBotMessagingService } from "../discord-bot/discord-bot-messaging/discord-bot-messaging.service" ;
1111import { DiscordBotVoiceChannelsService } from "../discord-bot/discord-bot-voice-channels/discord-bot-voice-channels.service" ;
1212import {
13+ e_match_status_enum ,
1314 match_map_veto_picks_set_input ,
1415 matches_set_input ,
1516 servers_set_input ,
@@ -20,6 +21,7 @@ import { ConfigService } from "@nestjs/config";
2021import { AppConfig } from "src/configs/types/AppConfig" ;
2122import { PostgresService } from "src/postgres/postgres.service" ;
2223import { NotificationsService } from "../notifications/notifications.service" ;
24+ import { DISCORD_COLORS } from "../notifications/utilities/constants" ;
2325import { MatchmakeService } from "src/matchmaking/matchmake.service" ;
2426import { InjectQueue } from "@nestjs/bullmq" ;
2527import { Queue } from "bullmq" ;
@@ -307,6 +309,18 @@ export class MatchesController {
307309
308310 const status = data . new . status ;
309311
312+ if (
313+ data . op === "UPDATE" &&
314+ data . old . status !== data . new . status &&
315+ data . new . status
316+ ) {
317+ void this . notifications . sendMatchStatusNotification (
318+ matchId ,
319+ data . new . status as e_match_status_enum ,
320+ data . old . status as e_match_status_enum ,
321+ ) ;
322+ }
323+
310324 if ( data . op === "DELETE" ) {
311325 await this . chatService . removeLobby ( ChatLobbyType . Match , matchId ) ;
312326 }
@@ -682,7 +696,7 @@ export class MatchesController {
682696 title : "Match Assistanced Required" ,
683697 role : "match_organizer" ,
684698 entity_id : data . match_id ,
685- } ) ;
699+ } , undefined , DISCORD_COLORS . RED ) ;
686700
687701 return {
688702 success : true ,
0 commit comments