mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-28 22:51:03 -07:00
19 lines
577 B
TypeScript
19 lines
577 B
TypeScript
import { BackendService } from '../../services/BackendService';
|
|
import { SessionPersistence } from '../../persistence';
|
|
|
|
export function removeFromBuddyList(userName: string): void {
|
|
removeFromList('buddy', userName);
|
|
}
|
|
|
|
export function removeFromIgnoreList(userName: string): void {
|
|
removeFromList('ignore', userName);
|
|
}
|
|
|
|
export function removeFromList(list: string, userName: string): void {
|
|
BackendService.sendSessionCommand('Command_RemoveFromList', { list, userName }, {
|
|
onSuccess: () => {
|
|
SessionPersistence.removeFromList(list, userName);
|
|
},
|
|
});
|
|
}
|