From ac4e085fce6b48471599c99d55b4f9bed5afcae7 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 24 Mar 2024 14:55:41 +0300 Subject: [PATCH] fix(upconv): properly convert ReplyTo Fix #1338 --- telegram/internal/upconv/upconv.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/telegram/internal/upconv/upconv.go b/telegram/internal/upconv/upconv.go index 2f6ce50fd3..de530c3d83 100644 --- a/telegram/internal/upconv/upconv.go +++ b/telegram/internal/upconv/upconv.go @@ -22,6 +22,13 @@ func convertOptional(msg *tg.Message, i tg.UpdatesClass) { msg.SetReplyTo(&v) } } + if u, ok := i.(interface { + GetReplyTo() (tg.MessageReplyHeaderClass, bool) + }); ok { + if v, ok := u.GetReplyTo(); ok { + msg.SetReplyTo(v) + } + } if u, ok := i.(interface { GetEntities() ([]tg.MessageEntityClass, bool) }); ok {