mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
Add the notify type to the notification query
This commit is contained in:
parent
13e216032f
commit
d242332aa4
4 changed files with 8 additions and 8 deletions
|
@ -117,7 +117,7 @@ class Notification extends BaseRepository
|
|||
*/
|
||||
public function selectDetailedForUser(int $uid): Collection\Notifications
|
||||
{
|
||||
$condition = [];
|
||||
$condition = ["`type` & ? != 0", $this->pconfig->get($uid, 'system', 'notify_type', 3 | 72 | 4 | 16 | 32) | 128 | 256];
|
||||
if (!$this->pconfig->get($uid, 'system', 'notify_like')) {
|
||||
$condition = DBA::mergeConditions($condition, ['`vid` != ?', Verb::getID(\Friendica\Protocol\Activity::LIKE)]);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class Notification extends BaseRepository
|
|||
*/
|
||||
public function selectDigestForUser(int $uid): Collection\Notifications
|
||||
{
|
||||
$values = [$uid];
|
||||
$values = [$uid, $this->pconfig->get($uid, 'system', 'notify_type', 3 | 72 | 4 | 16 | 32) | 128 | 256];
|
||||
|
||||
$like_condition = '';
|
||||
if (!$this->pconfig->get($uid, 'system', 'notify_like')) {
|
||||
|
@ -158,7 +158,7 @@ class Notification extends BaseRepository
|
|||
WHERE `id` IN (
|
||||
SELECT MAX(`id`)
|
||||
FROM `notification`
|
||||
WHERE `uid` = ?
|
||||
WHERE `uid` = ? AND `type` & ? != 0
|
||||
$like_condition
|
||||
$announce_condition
|
||||
GROUP BY IFNULL(`parent-uri-id`, `actor-id`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue