Skip to content

Commit

Permalink
Correct local storage key names for external game deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-bstein committed Oct 12, 2023
1 parent 755ef64 commit c370203
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { RouterService } from '@/services/router.service';
import { AppTitleService } from '@/services/app-title.service';
import { UserService } from '@/api/user.service';
import { ConfigService } from '@/utility/config.service';
import { UnsubscriberService } from '@/services/unsubscriber.service';

interface GameEnrollmentContext {
game: Game;
Expand Down Expand Up @@ -69,6 +70,7 @@ export class GamePageComponent implements OnDestroy {
private modalService: ModalConfirmService,
private routerService: RouterService,
private titleService: AppTitleService,
private unsub: UnsubscriberService,
private windowService: WindowService
) {
const user$ = localUser.user$.pipe(map(u => !!u ? u : {} as ApiUser));
Expand Down Expand Up @@ -236,10 +238,12 @@ export class GamePageComponent implements OnDestroy {
if (ctx.game.requireSynchronizedStart) {
await this.handleLiveSyncStartSessionJoined(ctx);

this.externalGameDeployStartSubscription = this.gameHubService.externalGameLaunchStarted$.subscribe(startState => {
if (startState)
this.handleLiveSyncStartSessionJoined(ctx);
});
this.unsub.add(
this.gameHubService.externalGameLaunchStarted$.subscribe(startState => {
if (startState)
this.handleLiveSyncStartSessionJoined(ctx);
})
);
}
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export class ExternalGameService {

const namespaceKeyName = this.computeNamespaceKey(game.teamId);
this.storage.addArbitrary(namespaceKeyName, JSON.stringify({
[`oidcLink`]: oidcLink,
[`gameServerUrl`]: game.gameServerUrl,
[`${namespaceKeyName}:oidcLink`]: oidcLink,
[`${namespaceKeyName}:gameServerUrl`]: game.gameServerUrl,
}));
}

Expand Down

0 comments on commit c370203

Please sign in to comment.