aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-27 05:09:19 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-27 05:09:19 +0300
commit6da0fd56fff386f19ae982cc02c8f0996c51e2f1 (patch)
treef8e491d6bf2a77655e74b0523e460c514425cd4f /telegram/utils.go
parent02444d7a044fad74414e7d55905ab5a13df61aae (diff)
Force downloading the chat photo when vCard is requested
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go9
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,
+ })
+}