Move notification to the new paradigm

This commit is contained in:
Hypolite Petovan 2021-09-18 00:03:32 -04:00
parent bc0734e0f1
commit 7a2d5f6a8e
16 changed files with 175 additions and 420 deletions

View file

@ -22,7 +22,7 @@
namespace Friendica\Module\Api\Mastodon\Notifications;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Module\BaseApi;
/**
@ -35,7 +35,7 @@ class Clear extends BaseApi
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
DBA::update('notification', ['seen' => true], ['uid' => $uid]);
DI::notification()->setAllSeenForUser($uid);
System::jsonExit([]);
}