Get tags from the admin
And uses tag "admin" to choose whether to display the console or not
This commit is contained in:
parent
3710c3cb7d
commit
98bda49d7e
6 changed files with 33 additions and 11 deletions
|
@ -43,6 +43,7 @@ export class RoomConnection implements RoomConnection {
|
|||
private listeners: Map<string, Function[]> = new Map<string, Function[]>();
|
||||
private static websocketFactory: null|((url: string)=>any) = null; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
private closed: boolean = false;
|
||||
private tags: string[] = [];
|
||||
|
||||
public static setWebsocketFactory(websocketFactory: (url: string)=>any): void { // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
RoomConnection.websocketFactory = websocketFactory;
|
||||
|
@ -124,6 +125,7 @@ export class RoomConnection implements RoomConnection {
|
|||
}
|
||||
|
||||
this.userId = roomJoinedMessage.getCurrentuserid();
|
||||
this.tags = roomJoinedMessage.getTagList();
|
||||
|
||||
this.dispatch(EventMessage.START_ROOM, {
|
||||
users,
|
||||
|
@ -478,4 +480,8 @@ export class RoomConnection implements RoomConnection {
|
|||
|
||||
this.socket.send(clientToServerMessage.serializeBinary().buffer);
|
||||
}
|
||||
|
||||
public hasTag(tag: string): boolean {
|
||||
return this.tags.indexOf(tag) !== -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue