mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:10:11 +00:00
API: Show activity notifications
This commit is contained in:
parent
dad6561715
commit
3f0937dd42
10 changed files with 204 additions and 80 deletions
|
@ -87,8 +87,13 @@ class Notification extends BaseRepository
|
|||
public function setSeen(bool $seen = true, Model\Notification $notify = null)
|
||||
{
|
||||
if (empty($notify)) {
|
||||
$this->dba->update('notification', ['seen' => $seen], ['uid' => local_user()]);
|
||||
$conditions = ['uid' => local_user()];
|
||||
} else {
|
||||
if (!empty($notify->{'uri-id'})) {
|
||||
$this->dba->update('notification', ['seen' => $seen], ['uid' => local_user(), 'target-uri-id' => $notify->{'uri-id'}]);
|
||||
}
|
||||
|
||||
$conditions = ['(`link` = ? OR (`parent` != 0 AND `parent` = ? AND `otype` = ?)) AND `uid` = ?',
|
||||
$notify->link,
|
||||
$notify->parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue