From 0e2522279e8671a345c1be6b8b07c0f1a505e23e Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 7 Nov 2018 14:36:50 -0500 Subject: Clean up various stuff (#508) * various cleanups --- bridge/telegram/telegram.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bridge/telegram/telegram.go') 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) -- cgit v1.2.3