mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-22 22:13:25 +08:00
Checks if self.Photo is nil
This commit is contained in:
parent
be14cc44a3
commit
3681f3bbfb
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