Merge pull request #21 from joseavilasg09/issue/check-profile-pic

Issue with empty profile pic
This commit is contained in:
divyam234 2023-08-29 11:31:36 +05:30 committed by GitHub
commit fff8849f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,9 @@ func (us *UserService) GetProfilePhoto(c *gin.Context) {
return err
}
peer := self.AsInputPeer()
if self.Photo == nil {
return nil
}
photo, ok := self.Photo.AsNotEmpty()
if !ok {
return errors.New("profile not found")