mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
12 lines
467 B
TypeScript
12 lines
467 B
TypeScript
import { create } from '@bufbuild/protobuf';
|
|
import { WebClient } from '../../WebClient';
|
|
|
|
import { Command_AccountImage_ext, Command_AccountImageSchema } from '@app/generated';
|
|
|
|
export function accountImage(image: Uint8Array): void {
|
|
WebClient.instance.protobuf.sendSessionCommand(Command_AccountImage_ext, create(Command_AccountImageSchema, { image }), {
|
|
onSuccess: () => {
|
|
WebClient.instance.response.session.accountImageChanged(image);
|
|
},
|
|
});
|
|
}
|