Merge pull request #10722 from MrPetovan/task/refactor-notifications

Move notify, notifications and introduction notifications to new paradigm
This commit is contained in:
Michael Vogel 2021-10-03 14:13:28 +02:00 committed by GitHub
commit 3d97149007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 2452 additions and 1948 deletions

View file

@ -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);