X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FNotify.php;h=9ebf5c23b3efc0ee07ef91e6b9b07490560a8727;hb=d53f46b9583737668a3314a22d1eeacb00a47db2;hp=b12eb341b0d188d4adbcdf4f8308e6301925584f;hpb=d84ceb327a59874564c92ff9942ace76d8141a64;p=friendica.git diff --git a/src/Model/Notify.php b/src/Model/Notify.php index b12eb341b0..9ebf5c23b3 100644 --- a/src/Model/Notify.php +++ b/src/Model/Notify.php @@ -1,8 +1,26 @@ . + * + */ namespace Friendica\Model; -use Exception; use Friendica\BaseModel; use Friendica\Content\Text\BBCode; use Friendica\Database\Database; @@ -32,10 +50,6 @@ use Psr\Log\LoggerInterface; */ class Notify extends BaseModel { - const OTYPE_ITEM = 'item'; - const OTYPE_INTRO = 'intro'; - const OTYPE_MAIL = 'mail'; - const OTYPE_PERSON = 'person'; /** @var \Friendica\Repository\Notify */ private $repo; @@ -50,31 +64,13 @@ class Notify extends BaseModel $this->setMsgCache(); } - /** - * Set the notification as seen - * - * @param bool $seen true, if seen - * - * @return bool True, if the seen state could be saved - */ - public function setSeen(bool $seen = true) - { - $this->seen = $seen; - try { - return $this->repo->update($this); - } catch (Exception $e) { - $this->logger->warning('Update failed.', ['$this' => $this, 'exception' => $e]); - return false; - } - } - /** * Sets the pre-formatted name (caching) */ private function setNameCache() { try { - $this->name_cache = strip_tags(BBCode::convert($this->source_name ?? '')); + $this->name_cache = strip_tags(BBCode::convert($this->source_name)); } catch (InternalServerErrorException $e) { } }