mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-25 07:25:57 +08:00
Merge pull request #16 from joseavilasg09/issue/profile-pic-empty
Fix issue with empty profile pic
This commit is contained in:
commit
e5906b711f
1 changed files with 3 additions and 0 deletions
|
@ -70,6 +70,9 @@ func (us *UserService) GetProfilePhoto(c *gin.Context) {
|
|||
return err
|
||||
}
|
||||
peer := self.AsInputPeer()
|
||||
if self.Photo == nil {
|
||||
return nil
|
||||
}
|
||||
photo, _ := self.Photo.AsNotEmpty()
|
||||
location := &tg.InputPeerPhotoFileLocation{Big: false, Peer: peer, PhotoID: photo.PhotoID}
|
||||
buff, err := iterContent(c, client, location)
|
||||
|
|
Loading…
Reference in a new issue