mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
Improved handling with empty user configuration
This commit is contained in:
parent
62701b49e1
commit
a07e47f50c
2 changed files with 24 additions and 5 deletions
|
@ -675,9 +675,14 @@ class Notify extends BaseRepository
|
|||
return true;
|
||||
}
|
||||
|
||||
$notify_type = $this->pConfig->get($Notification->uid, 'system', 'notify_type', 3 | 72 | 4 | 16 | 32);
|
||||
$notify_type = $this->pConfig->get($Notification->uid, 'system', 'notify_type');
|
||||
|
||||
if ($notify_type & $Notification->type) {
|
||||
// Fallback for the case when the notify type isn't set at all
|
||||
if (is_null($notify_type) && !in_array($type, [Notification::TYPE_RESHARE, Notification::TYPE_LIKE])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!is_null($notify_type) && ($notify_type & $Notification->type)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue