Checks if self.Photo is nil

This commit is contained in:
joseavilasg09 2023-08-27 01:28:39 -05:00
parent be14cc44a3
commit 3681f3bbfb

View file

@ -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)