From 95a6b9d452baae0aea68b6ebae861b1a402c5f17 Mon Sep 17 00:00:00 2001 From: itsnobii <57056220+itsnobii@users.noreply.github.com> Date: Sat, 4 Apr 2026 15:56:17 -0400 Subject: [PATCH 1/2] Allow sponsors, eventLogo, and Supporter information to persist during postmatch --- src/controller/MatchController.ts | 8 ++++++-- src/model/Match.ts | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/controller/MatchController.ts b/src/controller/MatchController.ts index a4fec81..b3dd804 100644 --- a/src/controller/MatchController.ts +++ b/src/controller/MatchController.ts @@ -3,6 +3,7 @@ import { AuthTeam, WebsocketIncoming } from "../connector/websocketIncoming"; import { WebsocketOutgoing } from "../connector/websocketOutgoing"; import { Match } from "../model/Match"; import { IAuthedAuxData, IAuthedData, IAuthenticationData } from "../model/eventData"; +import { ITournamentInfo, ISponsorInfo } from "../model/ToolsData"; import logging from "../util/Logging"; const Log = logging("MatchController"); @@ -18,7 +19,7 @@ export class MatchController { private codeToTeamInfo: Record = {}; private finishedGamesTeamInfo: Record< string, - { leftTeam: AuthTeam; rightTeam: AuthTeam; higherScore: 0 | 1 } + { leftTeam: AuthTeam; rightTeam: AuthTeam; higherScore: 0 | 1; tournamentInfo: ITournamentInfo; sponsorInfo: ISponsorInfo; isSupporter: boolean } > = {}; private teamInfoExpiry: Record = {}; @@ -201,11 +202,14 @@ export class MatchController { } } - public setWinningTeamInfo(groupCode: string, higherScoreTeam: 0 | 1) { + public setWinningTeamInfo(groupCode: string, higherScoreTeam: 0 | 1, sponsorInfo: ISponsorInfo, tournamentInfo: ITournamentInfo, isSupporter: boolean) { this.finishedGamesTeamInfo[groupCode] = { leftTeam: this.codeToTeamInfo[groupCode].leftTeam, rightTeam: this.codeToTeamInfo[groupCode].rightTeam, higherScore: higherScoreTeam, + tournamentInfo: tournamentInfo, + sponsorInfo: sponsorInfo, + isSupporter: isSupporter, }; } } diff --git a/src/model/Match.ts b/src/model/Match.ts index a54b808..98a1439 100644 --- a/src/model/Match.ts +++ b/src/model/Match.ts @@ -17,7 +17,7 @@ import { ReplayLogging } from "../util/ReplayLogging"; import { Maps } from "../util/ValorantInternalTranslator"; import { MatchController } from "../controller/MatchController"; import { DatabaseConnector } from "../connector/databaseConnector"; -import { ToolsData } from "./ToolsData"; +import { ToolsData, ITournamentInfo, ISponsorInfo } from "./ToolsData"; const Log = logging("Match"); export class Match { @@ -280,6 +280,9 @@ export class Match { MatchController.getInstance().setWinningTeamInfo( this.groupCode, this.teams[0].roundsWon > this.teams[1].roundsWon ? 0 : 1, + this.tools.sponsorInfo, + this.tools.tournamentInfo, + this.orgIsSupporter, ); this.eventNumber++; From 9bf659c5dcbd845248ff66efa679f7133c99858e Mon Sep 17 00:00:00 2001 From: Dunkel <7890309+DarkView@users.noreply.github.com> Date: Sun, 5 Apr 2026 15:26:20 +0200 Subject: [PATCH 2/2] Fix lint issue --- src/model/Match.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/Match.ts b/src/model/Match.ts index 98a1439..42b2827 100644 --- a/src/model/Match.ts +++ b/src/model/Match.ts @@ -17,7 +17,7 @@ import { ReplayLogging } from "../util/ReplayLogging"; import { Maps } from "../util/ValorantInternalTranslator"; import { MatchController } from "../controller/MatchController"; import { DatabaseConnector } from "../connector/databaseConnector"; -import { ToolsData, ITournamentInfo, ISponsorInfo } from "./ToolsData"; +import { ToolsData } from "./ToolsData"; const Log = logging("Match"); export class Match {