enhance(reversi): tweak reversi
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
|
Reference in New Issue
Block a user