Skip to content

Commit

Permalink
SW-621. Метод для пересылки сообщений forwardMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
olegius88 committed Jan 18, 2023
1 parent 15e766c commit dc5a2c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func main() {
| `Sending().SendLocation` | Метод предназначен для отправки сообщения геолокации |
| `Sending().SendContact` | Метод предназначен для отправки сообщения с контактом |
| `Sending().SendLink` | Метод предназначен для отправки сообщения со ссылкой, по которой будут добавлены превью изображения, заголовок и описание |
| `sending.forwardMessages` | Метод предназначен для пересылки сообщений в личный или групповой чат |
| `Service().CheckWhatsapp` | Метод проверяет наличие аккаунта WhatsApp на номере телефона |
| `Service().GetAvatar` | Метод возвращает аватар корреспондента или группового чата |
| `Service().GetContacts` | Метод предназначен для получения списка контактов текущего аккаунта |
Expand Down
5 changes: 5 additions & 0 deletions pkg/categories/methods/sending.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
}

0 comments on commit dc5a2c1

Please sign in to comment.