summaryrefslogtreecommitdiffstats
path: root/bridge/telegram/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/telegram/handlers.go')
-rw-r--r--bridge/telegram/handlers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go
index d9b104a3..6267c12b 100644
--- a/bridge/telegram/handlers.go
+++ b/bridge/telegram/handlers.go
@@ -199,6 +199,11 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
rmsg.ID = strconv.Itoa(message.MessageID)
rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10)
+ // preserve threading from telegram reply
+ if message.ReplyToMessage != nil {
+ rmsg.ParentID = strconv.Itoa(message.ReplyToMessage.MessageID)
+ }
+
// handle entities (adding URLs)
b.handleEntities(&rmsg, message)