approval none send cancel ban msg too

This commit is contained in:
xiaomlove
2022-06-16 02:29:11 +08:00
parent 8936580476
commit 990b8ab406
5 changed files with 22 additions and 2 deletions

View File

@@ -36,7 +36,12 @@ class TorrentOperationLog extends NexusModel
public static function add(array $params)
{
$log = self::query()->create($params);
if (!in_array($params['action_type'], [self::ACTION_TYPE_APPROVAL_ALLOW, self::ACTION_TYPE_APPROVAL_DENY])) {
$notifyActionTypes = [
self::ACTION_TYPE_APPROVAL_ALLOW,
self::ACTION_TYPE_APPROVAL_DENY,
self::ACTION_TYPE_APPROVAL_NONE,
];
if (!in_array($params['action_type'], $notifyActionTypes)) {
do_log("actionType: {$params['action_type']}, do not notify");
return $log;
}