enhance(reversi): tweak reversi
This commit is contained in:
parent
7d57487026
commit
fcd7ffe956
6 changed files with 79 additions and 13 deletions
|
@ -181,8 +181,8 @@ export interface ReversiGameEventTypes {
|
|||
value: any;
|
||||
};
|
||||
log: Reversi.Serializer.Log & { id: string | null };
|
||||
syncState: {
|
||||
crc32: string;
|
||||
heatbeat: {
|
||||
userId: MiUser['id'];
|
||||
};
|
||||
started: {
|
||||
game: Packed<'ReversiGameDetailed'>;
|
||||
|
|
|
@ -405,6 +405,11 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
|||
return this.reversiGamesRepository.findOneBy({ id });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async heatbeat(game: MiReversiGame, user: MiUser) {
|
||||
this.globalEventService.publishReversiGameStream(game.id, 'heatbeat', { userId: user.id });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public dispose(): void {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue