* Fixed issue with publishing browser notifications.

This commit is contained in:
tianshujie98
2021-08-18 17:26:21 +08:00
parent f3984ddb20
commit bce4ebbe55

View File

@@ -15,7 +15,7 @@ class messageModel extends model
{
return $this->dao->select('*')->from(TABLE_NOTIFY)
->where('objectType')->eq('message')
->andWhere('toList')->eq($this->app->user->account)
->andWhere('toList')->like("%,{$this->app->user->account},%")
->beginIF($status)->andWhere('status')->eq($status)->fi()
->fetchAll('id');
}
@@ -175,6 +175,7 @@ class messageModel extends model
if(strpos($object->mailto . ',', ",{$account},") === false) $toList .= ',' . $account;
}
}
$toList = ',' . trim($toList) . ',';
if($toList == 'closed') $toList = '';
return $toList;