mirror of
https://github.com/friendica/friendica
synced 2025-04-23 14:30:11 +00:00
Merge pull request #10722 from MrPetovan/task/refactor-notifications
Move notify, notifications and introduction notifications to new paradigm
This commit is contained in:
commit
3d97149007
57 changed files with 2452 additions and 1948 deletions
|
@ -126,9 +126,9 @@ class Delegation extends BaseModule
|
|||
|
||||
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getLoggedInUserNickname());
|
||||
|
||||
$condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], Notification\Type::INTRO, Notification\Type::MAIL];
|
||||
$condition = ["`msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", Notification\Type::INTRO, Notification\Type::MAIL];
|
||||
$params = ['distinct' => true, 'expression' => 'parent'];
|
||||
$notifications = DBA::count('notify', $condition, $params);
|
||||
$notifications = DI::notify()->countForUser($identity['uid'], $condition, $params);
|
||||
|
||||
$params = ['distinct' => true, 'expression' => 'convid'];
|
||||
$notifications += DBA::count('mail', ['uid' => $identity['uid'], 'seen' => false], $params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue