File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,53 @@ export class ChatService {
7171 return ;
7272 }
7373
74+ break ;
75+ case ChatLobbyType . Tournament :
76+ const { tournaments } = await this . hasuraService . query (
77+ {
78+ tournaments : {
79+ __args : {
80+ where : {
81+ id : {
82+ _eq : id ,
83+ } ,
84+ _or : [
85+ {
86+ is_organizer : {
87+ _eq : true ,
88+ } ,
89+ } ,
90+ {
91+ teams : {
92+ _or : [
93+ {
94+ owner_steam_id : {
95+ _eq : client . user . steam_id ,
96+ } ,
97+ } ,
98+ {
99+ roster : {
100+ player_steam_id : {
101+ _eq : client . user . steam_id ,
102+ } ,
103+ } ,
104+ } ,
105+ ] ,
106+ } ,
107+ } ,
108+ ] ,
109+ } ,
110+ } ,
111+ id : true ,
112+ } ,
113+ } ,
114+ client . user . steam_id ,
115+ ) ;
116+
117+ if ( tournaments . length === 0 ) {
118+ return ;
119+ }
120+
74121 break ;
75122 default :
76123 this . logger . warn ( `Unknown lobby type: ${ type } ` ) ;
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ export enum ChatLobbyType {
22 Match = "match" ,
33 Team = "team" ,
44 MatchMaking = "matchmaking" ,
5+ Tournament = "tournament" ,
56}
You can’t perform that action at this time.
0 commit comments