diff options
Diffstat (limited to 'telegram/commands.go')
-rw-r--r-- | telegram/commands.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/telegram/commands.go b/telegram/commands.go index 95afd8a..957c335 100644 --- a/telegram/commands.go +++ b/telegram/commands.go @@ -183,10 +183,13 @@ func (c *Client) unsubscribe(chatID int64) error { func (c *Client) sendMessagesReverse(chatID int64, messages []*client.Message) { for i := len(messages) - 1; i >= 0; i-- { + message := messages[i] + gateway.SendMessage( c.jid, strconv.FormatInt(chatID, 10), - c.formatMessage(0, 0, false, messages[i]), + c.formatMessage(0, 0, false, message), + strconv.FormatInt(message.Id, 10), c.xmpp, ) } |