diff options
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/telegram.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 378f383d..93cc82f6 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -377,7 +377,10 @@ func (b *Btelegram) handleUploadFile(msg *config.Message, chatid int64) (string, var c tgbotapi.Chattable for _, f := range msg.Extra["file"] { fi := f.(config.FileInfo) - file := tgbotapi.FileBytes{fi.Name, *fi.Data} + file := tgbotapi.FileBytes{ + Name: fi.Name, + Bytes: *fi.Data, + } re := regexp.MustCompile(".(jpg|png)$") if re.MatchString(fi.Name) { c = tgbotapi.NewPhotoUpload(chatid, file) |