Skip to content

Commit

Permalink
Fixing empty members on email list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jnesselr committed Sep 11, 2024
1 parent aa4ed36 commit e18f12d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/External/Google/GroupApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ public function list(?ApiProgress $apiProgress = null)
]);
}, $apiProgress)
->filter(function($group) {
if(! is_array($group)) { // Groups with no members come back as just a string?
return false;
}

if(! array_key_exists('type', $group)) {
return false;
}

return $group['type'] != 'CUSTOMER'; // No email key for this entry type
})
->map(function ($group) {
Expand Down

0 comments on commit e18f12d

Please sign in to comment.