diff options
author | mjentsch <mtthsjntsch@gmail.com> | 2015-08-09 19:31:40 +0300 |
---|---|---|
committer | mjentsch <mtthsjntsch@gmail.com> | 2015-08-09 19:47:21 +0300 |
commit | 71ba543692bcf45bdc2bd5a68ce13a03811eec7c (patch) | |
tree | 071d9447780499f213ce4e4802d5825b7801f2cf /tgl.h | |
parent | 5cc7e87da51a96163c465e7568aaef7c211afcfb (diff) |
Fix downloads of documents with audio / video flag
Instead of using the document attributes, use the InputMedia type to
determine the download type in tgl_do_load_document. This fixes an
FILE_ID_INVALID error in certain cases when sending a video or audio
file as regular document.
Diffstat (limited to 'tgl.h')
-rw-r--r-- | tgl.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -568,6 +568,9 @@ void tgl_do_load_photo (struct tgl_state *TLS, struct tgl_photo *photo, void (*c void tgl_do_load_encr_document (struct tgl_state *TLS, struct tgl_encr_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra); void tgl_do_load_document (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra); void tgl_do_load_document_thumb (struct tgl_state *TLS, struct tgl_document *video, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra); +void tgl_do_load_video (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra); +void tgl_do_load_audio (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra); + // loads file by location. Use only for small files! void tgl_do_load_file_location (struct tgl_state *TLS, struct tgl_file_location *FL, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra); |