diff --git a/broker/telegram.go b/broker/telegram.go index eef548c..2a3f52f 100644 --- a/broker/telegram.go +++ b/broker/telegram.go @@ -101,8 +101,9 @@ func (t Telegram) GetFile(data tg.FileRequestData, client net.Conn, callback int fail("Server didn't send a file info, does the file exist?") return } + result := *filespecs.Result - path := APIEndpoint + "file/bot" + t.Token + "/" + *(*(filespecs.Result).Path) + path := APIEndpoint + "file/bot" + t.Token + "/" + *result.Path fileresp, err := http.Get(path) if checkerr("GetFile/get", err) { fail("Could not retrieve file from Telegram's servers") @@ -117,9 +118,9 @@ func (t Telegram) GetFile(data tg.FileRequestData, client net.Conn, callback int } rawlen := len(rawdata) - if rawlen != *filespecs.Size { + if rawlen != *result.Size { // ??? - log.Printf("[GetFile] WARN ?? Downloaded file does not match provided filesize: %d != %d\n", rawlen, *filespecs.Size) + log.Printf("[GetFile] WARN ?? Downloaded file does not match provided filesize: %d != %d\n", rawlen, *result.Size) } b64data := base64.StdEncoding.EncodeToString(rawdata)