/
patch-it
46 lines (40 loc) · 2.24 KB
/
patch-it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git a/projects/gameboard-ui/src/app/components/gameboard-signalr-hubs/gameboard-signalr-hubs.component.ts b/projects/gameboard-ui/src/app/components/gameboard-signalr-hubs/gameboard-signalr-hubs.component.ts
index 4a62c8e6..90239460 100644
--- a/projects/gameboard-ui/src/app/components/gameboard-signalr-hubs/gameboard-signalr-hubs.component.ts
+++ b/projects/gameboard-ui/src/app/components/gameboard-signalr-hubs/gameboard-signalr-hubs.component.ts
@@ -73,6 +73,7 @@ export class GameboardSignalRHubsComponent implements OnDestroy {
// connect to the hubs
await this.gameHub.connect();
+ await this.supportHub.connect();
await this.userHub.connect();
// listen for interesting events to log
@@ -93,15 +94,10 @@ export class GameboardSignalRHubsComponent implements OnDestroy {
this.log("[GB UserHub]: Hub state is", userHubState);
this.userHubStatusLightState = this.hubStateToStatusLightState(userHubState);
this.userHubTooltip = `UserHub: ${userHubState}`;
- })
- );
+ }),
- // join the support hub (which everyone uses to get ticket updates)
- if (u.isAdmin || u.isSupport) {
- await this.supportHub.connect();
- await this.supportHub.joinStaffGroup();
- this.unsub.add(this.supportHub.hubState$.subscribe(supportHubState => this.supportHubStatusLightState = this.hubStateToStatusLightState(supportHubState)));
- }
+ this.supportHub.hubState$.subscribe(supportHubState => this.supportHubStatusLightState = this.hubStateToStatusLightState(supportHubState))
+ );
}
}
diff --git a/projects/gameboard-ui/src/app/services/signalR/support-hub.service.ts b/projects/gameboard-ui/src/app/services/signalR/support-hub.service.ts
index 67ba3dcb..c05474ae 100644
--- a/projects/gameboard-ui/src/app/services/signalR/support-hub.service.ts
+++ b/projects/gameboard-ui/src/app/services/signalR/support-hub.service.ts
@@ -41,10 +41,6 @@ export class SupportHubService {
);
}
- public async joinStaffGroup() {
- await this._signalRService.sendMessage("joinStaffGroup");
- }
-
private handleTicketClosed(ev: SupportHubEvent<TicketClosedEvent>) {
this.logService.logInfo("[GB Support Hub Staff Group]: Ticket Closed", ev);