diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-01-27 05:09:19 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-01-27 05:09:19 +0300 |
commit | 6da0fd56fff386f19ae982cc02c8f0996c51e2f1 (patch) | |
tree | f8e491d6bf2a77655e74b0523e460c514425cd4f /telegram/utils.go | |
parent | 02444d7a044fad74414e7d55905ab5a13df61aae (diff) |
Force downloading the chat photo when vCard is requested
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index 63a880e..be48497 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -635,3 +635,12 @@ func (c *Client) getLastMessages(id int64, query string, from int64, count int32 Limit: count, }) } + +// DownloadFile actually obtains a file by id given by TDlib +func (c *Client) DownloadFile(id int32, priority int32, synchronous bool) (*client.File, error) { + return c.client.DownloadFile(&client.DownloadFileRequest{ + FileId: id, + Priority: priority, + Synchronous: synchronous, + }) +} |