Refine download priorities
This commit is contained in:
parent
10e5f31b74
commit
7dc106a090
|
@ -133,7 +133,7 @@ func (c *Client) updateUserStatus(update *client.UpdateUserStatus) {
|
||||||
func (c *Client) updateNewChat(update *client.UpdateNewChat) {
|
func (c *Client) updateNewChat(update *client.UpdateNewChat) {
|
||||||
go func() {
|
go func() {
|
||||||
if update.Chat != nil && update.Chat.Photo != nil && update.Chat.Photo.Small != nil {
|
if update.Chat != nil && update.Chat.Photo != nil && update.Chat.Photo.Small != nil {
|
||||||
_, err := c.DownloadFile(update.Chat.Photo.Small.Id, 32, true)
|
_, err := c.DownloadFile(update.Chat.Photo.Small.Id, 10, true)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to download the chat photo")
|
log.Error("Failed to download the chat photo")
|
||||||
|
@ -198,7 +198,7 @@ func (c *Client) updateNewMessage(update *client.UpdateNewMessage) {
|
||||||
|
|
||||||
// download file(s)
|
// download file(s)
|
||||||
if file != nil && !file.Local.IsDownloadingCompleted {
|
if file != nil && !file.Local.IsDownloadingCompleted {
|
||||||
newFile, err := c.DownloadFile(file.Id, 10, true)
|
newFile, err := c.DownloadFile(file.Id, 1, true)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
file = newFile
|
file = newFile
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue