This commit is contained in:
tianshujie98
2021-08-19 09:13:03 +08:00
parent 54bf6bc829
commit 567021b12b
3 changed files with 12 additions and 7 deletions

View File

@@ -140,7 +140,7 @@ class messageModel extends model
$notify = new stdclass();
$notify->objectType = 'message';
$notify->action = $actionID;
$notify->toList = $toList;
$notify->toList = str_replace(",{$actor},", '', ",$toList,");
$notify->data = $data;
$notify->status = 'wait';
$notify->createdBy = $actor;
@@ -170,12 +170,8 @@ class messageModel extends model
$notifyPersons = array();
if(!empty($object->notify)) $notifyPersons = $this->loadModel('release')->getNotifyPersons($object->notify, $object->product, $object->build);
foreach($notifyPersons as $account)
{
if(strpos($object->mailto . ',', ",{$account},") === false) $toList .= ',' . $account;
}
if(!empty($notifyPersons)) $toList = implode(',', $notifyPersons);
}
$toList = ',' . trim($toList) . ',';
if($toList == 'closed') $toList = '';
return $toList;