From dc5a2c1980a29edba9ee992d368016f336ac3389 Mon Sep 17 00:00:00 2001 From: Oleg Shevchuk Date: Wed, 18 Jan 2023 18:02:42 +0600 Subject: [PATCH 1/2] =?UTF-8?q?SW-621.=20=D0=9C=D0=B5=D1=82=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20forwardMessages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + README_RU.md | 1 + pkg/categories/methods/sending.go | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index c399d12..e7d8c2e 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,7 @@ func main() { | `Sending().SendLocation` | The method is designed to send a geolocation message | | `Sending().SendContact` | The method is for sending a message with a contact | | `Sending().SendLink` | The method is designed to send a message with a link that will add an image preview, title and description | +| `Sending().ForwardMessages` | The method is intended for forwarding messages to a personal or group chat | | `Service().CheckWhatsapp` | The method checks if there is a WhatsApp account on the phone number | | `Service().GetAvatar` | The method returns the avatar of the correspondent or group chat | | `Service().GetContacts` | The method is designed to get a list of contacts of the current account | diff --git a/README_RU.md b/README_RU.md index 7b1c35f..ea7face 100644 --- a/README_RU.md +++ b/README_RU.md @@ -249,6 +249,7 @@ func main() { | `Sending().SendLocation` | Метод предназначен для отправки сообщения геолокации | | `Sending().SendContact` | Метод предназначен для отправки сообщения с контактом | | `Sending().SendLink` | Метод предназначен для отправки сообщения со ссылкой, по которой будут добавлены превью изображения, заголовок и описание | +| `sending.forwardMessages` | Метод предназначен для пересылки сообщений в личный или групповой чат | | `Service().CheckWhatsapp` | Метод проверяет наличие аккаунта WhatsApp на номере телефона | | `Service().GetAvatar` | Метод возвращает аватар корреспондента или группового чата | | `Service().GetContacts` | Метод предназначен для получения списка контактов текущего аккаунта | diff --git a/pkg/categories/methods/sending.go b/pkg/categories/methods/sending.go index 86e8050..5bb9bc0 100644 --- a/pkg/categories/methods/sending.go +++ b/pkg/categories/methods/sending.go @@ -48,3 +48,8 @@ func (c SendingCategory) SendContact(parameters map[string]interface{}) (map[str func (c SendingCategory) SendLink(parameters map[string]interface{}) (map[string]interface{}, error) { return c.GreenAPI.Request("POST", "sendLink", parameters, "") } + +// ForwardMessages is designed for forwarding messages to a personal or group chat +func (c SendingCategory) ForwardMessages(parameters map[string]interface{}) (map[string]interface{}, error) { + return c.GreenAPI.Request("POST", "forwardMessages", parameters, "") +} From 9b9bc4d1fb1f766f1e84866f29702ccae8a71f82 Mon Sep 17 00:00:00 2001 From: Oleg Shevchuk Date: Wed, 18 Jan 2023 18:05:16 +0600 Subject: [PATCH 2/2] =?UTF-8?q?SW-621.=20=D0=9C=D0=B5=D1=82=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20forwardMessages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README_RU.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7d8c2e..5340353 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ func main() { | `Sending().SendLocation` | The method is designed to send a geolocation message | | `Sending().SendContact` | The method is for sending a message with a contact | | `Sending().SendLink` | The method is designed to send a message with a link that will add an image preview, title and description | -| `Sending().ForwardMessages` | The method is intended for forwarding messages to a personal or group chat | +| `Sending().ForwardMessages` | The method is designed for forwarding messages to a personal or group chat | | `Service().CheckWhatsapp` | The method checks if there is a WhatsApp account on the phone number | | `Service().GetAvatar` | The method returns the avatar of the correspondent or group chat | | `Service().GetContacts` | The method is designed to get a list of contacts of the current account | diff --git a/README_RU.md b/README_RU.md index ea7face..a23e095 100644 --- a/README_RU.md +++ b/README_RU.md @@ -249,7 +249,7 @@ func main() { | `Sending().SendLocation` | Метод предназначен для отправки сообщения геолокации | | `Sending().SendContact` | Метод предназначен для отправки сообщения с контактом | | `Sending().SendLink` | Метод предназначен для отправки сообщения со ссылкой, по которой будут добавлены превью изображения, заголовок и описание | -| `sending.forwardMessages` | Метод предназначен для пересылки сообщений в личный или групповой чат | +| `sending().ForwardMessages` | Метод предназначен для пересылки сообщений в личный или групповой чат | | `Service().CheckWhatsapp` | Метод проверяет наличие аккаунта WhatsApp на номере телефона | | `Service().GetAvatar` | Метод возвращает аватар корреспондента или группового чата | | `Service().GetContacts` | Метод предназначен для получения списка контактов текущего аккаунта |