Bladeren bron

修改站内信发送规则

kely 7 maanden geleden
bovenliggende
commit
2ba33bc53d

+ 1 - 1
app/Models/Enums/PermissionName.php

@@ -13,7 +13,7 @@ enum PermissionName: string
         return match ($this) {
             self::CONFIG_INDEX, self::CONFIG_SETTING => [
                 'email' => 'config-email',
-                'browser' => 'config-email',
+                'browser' => 'config-browser',
             ],
             default => []
         };

+ 1 - 1
app/Services/Notification/ActionBrowser/RequirementNotification.php

@@ -8,6 +8,6 @@ class RequirementNotification extends ActionBrowserNotificationAbstract
 {
     protected function userIDs(): array
     {
-        return $this->object->reviewed_by > 0 ? [$this->object->reviewed_by ] :[];
+        return $this->object->mailto > 0 ? [$this->object->mailto ] :[];
     }
 }

+ 3 - 1
app/Services/Notification/ActionBrowser/TaskNotification.php

@@ -8,6 +8,8 @@ class TaskNotification extends ActionBrowserNotificationAbstract
 {
     protected function userIDs(): array
     {
-        return $this->object->assign > 0 ? [$this->object->assign] : [];
+        $assignArray=$this->object->assign;
+        $mailtoArray=$this->object->mailto;
+        return (!empty($assignArray) || !empty($mailtoArray)) ? array_unique(array_merge($assignArray, $mailtoArray)) : [];
     }
 }