diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-04 05:41:45 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-04 05:41:45 +0300 |
commit | 6e32c62f8dac5ccc97dd0a6067965ba2689f3c86 (patch) | |
tree | 8991478d056f538ed1782bfb66e6071486b8c9bf /telegram/commands.go | |
parent | b3d66993e5962d2b961631e3afa578967a7b3d8a (diff) |
Assign IDs from Telegram to XMPP messages
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, ) } |