aboutsummaryrefslogtreecommitdiff
path: root/telegram
diff options
context:
space:
mode:
Diffstat (limited to 'telegram')
-rw-r--r--telegram/utils.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index ecce6da..a4a2bd4 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -330,9 +330,13 @@ func (c *Client) getMessageReply(message *client.Message) (reply *gateway.Reply,
return
}
+ replyId, err := gateway.IdsDB.GetByTgIds(c.Session.Login, c.jid, message.ChatId, message.ReplyToMessageId)
+ if err != nil {
+ replyId = strconv.FormatInt(message.ReplyToMessageId, 10)
+ }
reply = &gateway.Reply{
Author: fmt.Sprintf("%v@%s", c.getSenderId(replyMsg), gateway.Jid.Full()),
- Id: strconv.FormatInt(message.ReplyToMessageId, 10),
+ Id: replyId,
}
}