moderation: add chat bans for groups/channels with web actions
All checks were successful
CI / test (push) Successful in 26s

This commit is contained in:
2026-03-08 14:29:21 +03:00
parent 76cc5e0f12
commit db700bcbcd
10 changed files with 224 additions and 3 deletions

View File

@@ -329,6 +329,14 @@ export async function removeChatMember(chatId: number, userId: number): Promise<
await http.delete(`/chats/${chatId}/members/${userId}`);
}
export async function banChatMember(chatId: number, userId: number): Promise<void> {
await http.post(`/chats/${chatId}/bans/${userId}`);
}
export async function unbanChatMember(chatId: number, userId: number): Promise<void> {
await http.delete(`/chats/${chatId}/bans/${userId}`);
}
export async function leaveChat(chatId: number): Promise<void> {
await http.post(`/chats/${chatId}/leave`);
}