Commit ef53036e authored by Mark Harding's avatar Mark Harding
Browse files

Merge branch 'fix/banned-suggested-channels-381' into 'master'

[Sprint/JollyJellyfish](fix): Filtering banned and deleted channels

Closes #381

See merge request !284
parents b50c93d2 84da7d65
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,10 @@ class Manager
        // TODO: make this a bulk request vs sequential
        // TODO: make this a bulk request vs sequential
        foreach ($response as $suggestion) {
        foreach ($response as $suggestion) {
            $entity = $suggestion->getEntity() ?: $this->entitiesBuilder->single($suggestion->getEntityGuid());
            $entity = $suggestion->getEntity() ?: $this->entitiesBuilder->single($suggestion->getEntityGuid());
            if ($entity->getDeleted()) {
                error_log("Deleted entity ".$entity->guid." has been omitted from suggestions t-".time());
                break;
            }
            $suggestion->setEntity($entity);
            $suggestion->setEntity($entity);
        }
        }