diff --git a/im/tg/tg.go b/im/tg/tg.go index 5080b26..a2ad413 100644 --- a/im/tg/tg.go +++ b/im/tg/tg.go @@ -291,8 +291,11 @@ func (sender *Sender) Reply(msgs ...interface{}) (int, error) { is := []tb.InputMedia{} for index, path := range paths { if strings.Contains(path, "base64") { - sender.Reply(path[0:30]) - decodeBytes, _ := base64.StdEncoding.DecodeString(path) + + decodeBytes, err := base64.StdEncoding.DecodeString(path) + if err != nil { + sender.Reply(err) + } i := &tb.Photo{File: tb.FromReader(bytes.NewReader(decodeBytes))} if index == 0 { i.Caption = message