aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
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,
+ })
+}