From 12621dc3f9aea80c85bf0ed72e33fd94cdf9fd15 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Tue, 5 Nov 2024 16:41:40 +0300 Subject: [PATCH 1/2] Fix typos --- pachca.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pachca.go b/pachca.go index 08e1584..e9a5465 100644 --- a/pachca.go +++ b/pachca.go @@ -415,7 +415,7 @@ var ( ErrEmptyUsersIDS = errors.New("Users IDs are empty") ErrEmptyTagsIDS = errors.New("Tags IDs are empty") ErrEmptyFilePath = errors.New("Path to file is empty") - ErrInvalidToken = errors.New("Token is has wrong format") + ErrInvalidToken = errors.New("Token has wrong format") ErrInvalidMessageID = errors.New("Message ID must be greater than 0") ErrInvalidChatID = errors.New("Chat ID must be greater than 0") ErrInvalidUserID = errors.New("User ID must be greater than 0") From d3769c7b753c3d295768df43b40ba88554b75d6d Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Tue, 5 Nov 2024 22:53:31 +0300 Subject: [PATCH 2/2] Fix bug with using wrong HTTP method for AddChatUsers --- pachca.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pachca.go b/pachca.go index e9a5465..e5f0f9c 100644 --- a/pachca.go +++ b/pachca.go @@ -1134,7 +1134,7 @@ func (c *Client) AddChatUsers(chatID uint64, membersIDs []uint64, silent bool) e } err := c.sendRequest( - req.PUT, getURL("/chats/%d/members", chatID), + req.POST, getURL("/chats/%d/members", chatID), query, payload, nil, )