mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +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
|
@ -110,6 +110,13 @@ class Notification extends BaseRepository
|
|||
return $this->db->update(self::$table_name, ['seen' => true], $condition);
|
||||
}
|
||||
|
||||
public function setAllDismissedForUser(int $uid, array $condition = []): bool
|
||||
{
|
||||
$condition = DBA::mergeConditions($condition, ['uid' => $uid]);
|
||||
|
||||
return $this->db->update(self::$table_name, ['dismissed' => true], $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Entity\Notification $Notification
|
||||
* @return Entity\Notification
|
||||
|
@ -125,6 +132,7 @@ class Notification extends BaseRepository
|
|||
'target-uri-id' => $Notification->targetUriId,
|
||||
'parent-uri-id' => $Notification->parentUriId,
|
||||
'seen' => $Notification->seen,
|
||||
'dismissed' => $Notification->dismissed,
|
||||
];
|
||||
|
||||
if ($Notification->id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue