Cockatrice/webclient/src/websocket/commands/session/listUsers.ts
2026-04-16 12:40:47 -05:00

13 lines
501 B
TypeScript

import { create } from '@bufbuild/protobuf';
import { WebClient } from '../../WebClient';
import { Command_ListUsers_ext, Command_ListUsersSchema, Response_ListUsers_ext } from '@app/generated';
export function listUsers(): void {
WebClient.instance.protobuf.sendSessionCommand(Command_ListUsers_ext, create(Command_ListUsersSchema), {
responseExt: Response_ListUsers_ext,
onSuccess: (response) => {
WebClient.instance.response.session.updateUsers(response.userList);
},
});
}