mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { SessionCommands } from 'websocket';
|
|
import { common } from 'protobufjs';
|
|
import IBytesValue = common.IBytesValue;
|
|
|
|
export default class SessionService {
|
|
static addToBuddyList(userName: string) {
|
|
SessionCommands.addToBuddyList(userName);
|
|
}
|
|
|
|
static removeFromBuddyList(userName: string) {
|
|
SessionCommands.removeFromBuddyList(userName);
|
|
}
|
|
|
|
static addToIgnoreList(userName: string) {
|
|
SessionCommands.addToIgnoreList(userName);
|
|
}
|
|
|
|
static removeFromIgnoreList(userName: string) {
|
|
SessionCommands.removeFromIgnoreList(userName);
|
|
}
|
|
|
|
static changeAccountPassword(oldPassword: string, newPassword: string, hashedNewPassword?: string): void {
|
|
SessionCommands.accountPassword(oldPassword, newPassword, hashedNewPassword);
|
|
}
|
|
|
|
static changeAccountDetails(passwordCheck: string, realName?: string, email?: string, country?: string): void {
|
|
SessionCommands.accountEdit(passwordCheck, realName, email, country);
|
|
}
|
|
|
|
static changeAccountImage(image: IBytesValue): void {
|
|
SessionCommands.accountImage(image);
|
|
}
|
|
|
|
static sendDirectMessage(userName: string, message: string): void {
|
|
SessionCommands.message(userName, message);
|
|
}
|
|
|
|
static getUserInfo(userName: string): void {
|
|
SessionCommands.getUserInfo(userName);
|
|
}
|
|
|
|
static getUserGames(userName: string): void {
|
|
SessionCommands.getGamesOfUser(userName);
|
|
}
|
|
}
|