diff --git a/services/user.service.go b/services/user.service.go index e9d752d..e74f433 100644 --- a/services/user.service.go +++ b/services/user.service.go @@ -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")