Skip to content
Commits on Source (2)
......@@ -29,7 +29,9 @@ class Spam
$foundSpam = Text::strposa($entity->getBody(), ProhibitedDomains::DOMAINS);
break;
}
$foundSpam = Text::strposa($entity->getDescription(), ProhibitedDomains::DOMAINS);
if (method_exists($entity, 'getDescription')) {
$foundSpam = Text::strposa($entity->getDescription(), ProhibitedDomains::DOMAINS);
}
break;
case 'user':
$foundSpam = Text::strposa($entity->briefdescription, ProhibitedDomains::DOMAINS);
......
......@@ -386,4 +386,26 @@ class Image extends File
$this->time_sent = $time_sent;
return $this;
}
/**
* Return description
* @return string
*/
public function getDescription(): string
{
return $this->description ?: '';
}
/**
* Set description
*
* @param string $description - description to be set.
* @return Image
*/
public function setDescription($description): Image
{
$this->description = $description;
return $this;
}
}
......@@ -296,4 +296,25 @@ class Video extends MindsObject
$this->time_sent = $time_sent;
return $this;
}
/**
* Return description
* @return string
*/
public function getDescription(): string
{
return $this->description ?: '';
}
/**
* Set description
*
* @param string $description - description to be set.
* @return Video
*/
public function setDescription($description): Video
{
$this->description = $description;
return $this;
}
}