refactor: methods for mute/unmute chat added

This commit is contained in:
Sale Djenic 2021-12-07 15:17:17 +01:00 committed by saledjenic
parent 2fab5ae9c4
commit bfac7c57e1
1 changed files with 9 additions and 1 deletions

View File

@ -64,3 +64,11 @@ proc sendImages*(chatId: string, images: var seq[string]): RpcResponse[JsonNode]
}
)
callPrivateRPC("sendChatMessages".prefix, %* [imagesJson])
proc muteChat*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [chatId]
result = callPrivateRPC("muteChat".prefix, payload)
proc unmuteChat*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [chatId]
result = callPrivateRPC("unmuteChat".prefix, payload)