p1: add forward without author option
All checks were successful
CI / test (push) Successful in 21s

This commit is contained in:
2026-03-08 14:11:04 +03:00
parent 5ae5821c20
commit 33e467d2a5
5 changed files with 27 additions and 9 deletions

View File

@@ -182,16 +182,18 @@ export async function updateMessageStatus(
});
}
export async function forwardMessage(messageId: number, targetChatId: number): Promise<Message> {
export async function forwardMessage(messageId: number, targetChatId: number, includeAuthor = true): Promise<Message> {
const { data } = await http.post<Message>(`/messages/${messageId}/forward`, {
target_chat_id: targetChatId
target_chat_id: targetChatId,
include_author: includeAuthor
});
return data;
}
export async function forwardMessageBulk(messageId: number, targetChatIds: number[]): Promise<Message[]> {
export async function forwardMessageBulk(messageId: number, targetChatIds: number[], includeAuthor = true): Promise<Message[]> {
const { data } = await http.post<Message[]>(`/messages/${messageId}/forward-bulk`, {
target_chat_ids: targetChatIds
target_chat_ids: targetChatIds,
include_author: includeAuthor
});
return data;
}