mirror of
https://github.com/friendica/friendica
synced 2025-04-29 05:04:24 +02:00
Move notification to the new paradigm
This commit is contained in:
parent
bc0734e0f1
commit
7a2d5f6a8e
16 changed files with 175 additions and 420 deletions
|
@ -78,7 +78,7 @@ class Notification extends BaseModule
|
|||
|
||||
if (DI::args()->get(1) === 'mark' && DI::args()->get(2) === 'all') {
|
||||
try {
|
||||
DI::dba()->update('notification', ['seen' => true], ['uid' => local_user()]);
|
||||
DI::notification()->setAllSeenForUser(local_user());
|
||||
$success = DI::notify()->setAllSeenForUser(local_user());
|
||||
} catch (\Exception $e) {
|
||||
DI::logger()->warning('set all seen failed.', ['exception' => $e]);
|
||||
|
@ -118,7 +118,7 @@ class Notification extends BaseModule
|
|||
DI::notify()->save($Notify);
|
||||
} else {
|
||||
if ($Notify->uriId) {
|
||||
DI::dba()->update('notification', ['seen' => true], ['uid' => $Notify->uid, 'target-uri-id' => $Notify->uriId]);
|
||||
DI::notification()->setAllSeenForUser($Notify->uid, ['target-uri-id' => $Notify->uriId]);
|
||||
}
|
||||
|
||||
DI::notify()->setAllSeenForRelatedNotify($Notify);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue