mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
17 lines
529 B
TypeScript
17 lines
529 B
TypeScript
import { create } from '@bufbuild/protobuf';
|
|
import webClient from '../../WebClient';
|
|
|
|
import { SessionPersistence } from '../../persistence';
|
|
import { Data } from '@app/types';
|
|
|
|
export function replayModifyMatch(gameId: number, doNotHide: boolean): void {
|
|
webClient.protobuf.sendSessionCommand(
|
|
Data.Command_ReplayModifyMatch_ext,
|
|
create(Data.Command_ReplayModifyMatchSchema, { gameId, doNotHide }),
|
|
{
|
|
onSuccess: () => {
|
|
SessionPersistence.replayModifyMatch(gameId, doNotHide);
|
|
},
|
|
}
|
|
);
|
|
}
|