mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
Use constants
This commit is contained in:
parent
da33517a2d
commit
62701b49e1
2 changed files with 13 additions and 24 deletions
|
@ -677,19 +677,7 @@ class Notify extends BaseRepository
|
|||
|
||||
$notify_type = $this->pConfig->get($Notification->uid, 'system', 'notify_type', 3 | 72 | 4 | 16 | 32);
|
||||
|
||||
if (($notify_type & 3) && in_array($Notification->type, [Model\Post\UserNotification::TYPE_EXPLICIT_TAGGED, Model\Post\UserNotification::TYPE_IMPLICIT_TAGGED])) {
|
||||
return true;
|
||||
}
|
||||
if (($notify_type & 72) && in_array($Notification->type, [Model\Post\UserNotification::TYPE_DIRECT_COMMENT, Model\Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT])) {
|
||||
return true;
|
||||
}
|
||||
if (($notify_type & 4) && in_array($Notification->type, [Model\Post\UserNotification::TYPE_THREAD_COMMENT])) {
|
||||
return true;
|
||||
}
|
||||
if (($notify_type & 16) && in_array($Notification->type, [Model\Post\UserNotification::TYPE_COMMENT_PARTICIPATION])) {
|
||||
return true;
|
||||
}
|
||||
if (($notify_type & 32) && in_array($Notification->type, [Model\Post\UserNotification::TYPE_ACTIVITY_PARTICIPATION])) {
|
||||
if ($notify_type & $Notification->type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue