mirror of
https://github.com/friendica/friendica
synced 2025-04-25 17:50:11 +00:00
API: Set "dismissed" instead of "seen"
This commit is contained in:
parent
c371d2ec82
commit
f7e859ec2c
10 changed files with 36 additions and 13 deletions
|
@ -68,7 +68,7 @@ class Notifications extends BaseApi
|
|||
|
||||
$params = ['order' => ['id' => true]];
|
||||
|
||||
$condition = ['uid' => $uid, 'seen' => false];
|
||||
$condition = ['uid' => $uid, 'dismissed' => false];
|
||||
|
||||
if (!empty($request['account_id'])) {
|
||||
$contact = Contact::getById($request['account_id'], ['url']);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Clear extends BaseApi
|
|||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
DI::notification()->setAllSeenForUser($uid);
|
||||
DI::notification()->setAllDismissedForUser($uid);
|
||||
|
||||
System::jsonExit([]);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class Dismiss extends BaseApi
|
|||
}
|
||||
|
||||
$Notification = DI::notification()->selectOneForUser($uid, $this->parameters['id']);
|
||||
$Notification->setSeen();
|
||||
$Notification->setDismissed();
|
||||
DI::notification()->save($Notification);
|
||||
|
||||
System::jsonExit([]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue