Respond for message sending errors

This commit is contained in:
bodqhrohro 2019-12-21 01:44:21 +02:00
parent 472d4b7bef
commit d439b7a581

View file

@ -496,10 +496,18 @@ func (c *Client) ProcessOutgoingMessage(chatID int64, text string, messageID int
}
}
c.client.SendMessage(&client.SendMessageRequest{
_, err := c.client.SendMessage(&client.SendMessageRequest{
ChatId: chatID,
ReplyToMessageId: reply,
InputMessageContent: message,
})
if err != nil {
gateway.SendMessage(
returnJid,
strconv.FormatInt(chatID, 10),
fmt.Sprintf("Message not sent: %s", err.Error()),
c.xmpp,
)
}
}
}