no message
This commit is contained in:
parent
c490b7dde0
commit
c882583d57
@ -96,7 +96,7 @@ final class TicketController extends BaseController
|
|||||||
|
|
||||||
Notification::notifyUser(
|
Notification::notifyUser(
|
||||||
$user,
|
$user,
|
||||||
$_ENV['appName'] . '-工单被回复',
|
$_ENV['appName'] . ' - 工单被回复',
|
||||||
'你好,有人回复了<a href="' . $_ENV['baseUrl'] . '/user/ticket/' . $ticket->id . '/detail">工单</a>。<br><br>回复内容:'.$comment
|
'你好,有人回复了<a href="' . $_ENV['baseUrl'] . '/user/ticket/' . $ticket->id . '/detail">工单</a>。<br><br>回复内容:'.$comment
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ final class TicketController extends BaseController
|
|||||||
|
|
||||||
Notification::notifyUser(
|
Notification::notifyUser(
|
||||||
$user,
|
$user,
|
||||||
$_ENV['appName'] . '-工单被回复',
|
$_ENV['appName'] . ' - 工单被回复',
|
||||||
'你好,AI 回复了<a href="' . $_ENV['baseUrl'] . '/user/ticket/' . $ticket->id . '/view">工单</a>,请你查看。'
|
'你好,AI 回复了<a href="' . $_ENV['baseUrl'] . '/user/ticket/' . $ticket->id . '/view">工单</a>,请你查看。'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -207,7 +207,7 @@ final class AuthController extends BaseController
|
|||||||
try {
|
try {
|
||||||
Mail::send(
|
Mail::send(
|
||||||
$email,
|
$email,
|
||||||
$_ENV['appName'] . '- 验证邮件',
|
$_ENV['appName'] . ' - 验证邮件',
|
||||||
'verify_code.tpl',
|
'verify_code.tpl',
|
||||||
[
|
[
|
||||||
'code' => $email_code,
|
'code' => $email_code,
|
||||||
|
|||||||
@ -64,7 +64,7 @@ final class LoginIp extends Model
|
|||||||
try {
|
try {
|
||||||
Notification::notifyUser(
|
Notification::notifyUser(
|
||||||
(new User())->where('id', $user_id)->first(),
|
(new User())->where('id', $user_id)->first(),
|
||||||
$_ENV['appName'] . '-新登录通知',
|
$_ENV['appName'] . ' - 新登录通知',
|
||||||
'你的账号于 ' . date('Y-m-d H:i:s') . ' 通过 ' . $this->ip . ' 地址登录了用户面板',
|
'你的账号于 ' . date('Y-m-d H:i:s') . ' 通过 ' . $this->ip . ' 地址登录了用户面板',
|
||||||
);
|
);
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
|
|||||||
@ -67,7 +67,7 @@ final class SubscribeLog extends Model
|
|||||||
try {
|
try {
|
||||||
Notification::notifyUser(
|
Notification::notifyUser(
|
||||||
$user,
|
$user,
|
||||||
$_ENV['appName'] . '-新订阅通知',
|
$_ENV['appName'] . ' - 新订阅通知',
|
||||||
'你的账号于 ' . date('Y-m-d H:i:s') . ' 通过 ' . $this->request_ip . ' 地址订阅了新的节点',
|
'你的账号于 ' . date('Y-m-d H:i:s') . ' 通过 ' . $this->request_ip . ' 地址订阅了新的节点',
|
||||||
);
|
);
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
|
|||||||
@ -408,28 +408,28 @@ final class Cron
|
|||||||
if ($node->getNodeOnlineStatus() === -1 && $node->online === 1) {
|
if ($node->getNodeOnlineStatus() === -1 && $node->online === 1) {
|
||||||
echo 'Send Node Offline Email to admin users' . PHP_EOL;
|
echo 'Send Node Offline Email to admin users' . PHP_EOL;
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
Notification::notifyAdmin(
|
// Notification::notifyAdmin(
|
||||||
$_ENV['appName'] . '-系统警告',
|
// $_ENV['appName'] . '-系统警告',
|
||||||
'管理员你好,系统发现节点 ' . $node->name . ' 掉线了,请你及时处理。'
|
// '管理员你好,系统发现节点 ' . $node->name . ' 掉线了,请你及时处理。'
|
||||||
);
|
// );
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (Config::obtain('telegram_node_offline')) {
|
// if (Config::obtain('telegram_node_offline')) {
|
||||||
$notice_text = str_replace(
|
// $notice_text = str_replace(
|
||||||
'%node_name%',
|
// '%node_name%',
|
||||||
$node->name,
|
// $node->name,
|
||||||
Config::obtain('telegram_node_offline_text')
|
// Config::obtain('telegram_node_offline_text')
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
(new Telegram())->send(0, $notice_text);
|
// (new Telegram())->send(0, $notice_text);
|
||||||
} catch (TelegramSDKException $e) {
|
// } catch (TelegramSDKException $e) {
|
||||||
echo $e->getMessage();
|
// echo $e->getMessage();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
$node->online = 0;
|
$node->online = 0;
|
||||||
$node->save();
|
$node->save();
|
||||||
@ -440,28 +440,28 @@ final class Cron
|
|||||||
if ($node->getNodeOnlineStatus() === 1 && $node->online === 0) {
|
if ($node->getNodeOnlineStatus() === 1 && $node->online === 0) {
|
||||||
echo 'Send Node Online Email to admin user' . PHP_EOL;
|
echo 'Send Node Online Email to admin user' . PHP_EOL;
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
Notification::notifyAdmin(
|
// Notification::notifyAdmin(
|
||||||
$_ENV['appName'] . '-系统提示',
|
// $_ENV['appName'] . '-系统提示',
|
||||||
'管理员你好,系统发现节点 ' . $node->name . ' 恢复上线了。'
|
// '管理员你好,系统发现节点 ' . $node->name . ' 恢复上线了。'
|
||||||
);
|
// );
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (Config::obtain('telegram_node_online')) {
|
// if (Config::obtain('telegram_node_online')) {
|
||||||
$notice_text = str_replace(
|
// $notice_text = str_replace(
|
||||||
'%node_name%',
|
// '%node_name%',
|
||||||
$node->name,
|
// $node->name,
|
||||||
Config::obtain('telegram_node_online_text')
|
// Config::obtain('telegram_node_online_text')
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
(new Telegram())->send(0, $notice_text);
|
// (new Telegram())->send(0, $notice_text);
|
||||||
} catch (TelegramSDKException $e) {
|
// } catch (TelegramSDKException $e) {
|
||||||
echo $e->getMessage();
|
// echo $e->getMessage();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
$node->online = 1;
|
$node->online = 1;
|
||||||
$node->save();
|
$node->save();
|
||||||
@ -519,7 +519,7 @@ final class Cron
|
|||||||
// 这里返水的话,等于是直接覆盖的用户不返水,自然过期的用户返水,这到合理,自然过期的才是好用户
|
// 这里返水的话,等于是直接覆盖的用户不返水,自然过期的用户返水,这到合理,自然过期的才是好用户
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Notification::notifyUser($user, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
Notification::notifyUser($user, $_ENV['appName'] . ' - 您的套餐已经过期', $text);
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
}
|
||||||
@ -1367,7 +1367,7 @@ final class Cron
|
|||||||
$oUser->class_expire = $iToExpire;
|
$oUser->class_expire = $iToExpire;
|
||||||
$oUser->save();
|
$oUser->save();
|
||||||
|
|
||||||
Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
Notification::notifyUser($oUser, $_ENV['appName'] . ' - 您的套餐已经过期', $text);
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
// Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
// Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
||||||
@ -1917,7 +1917,7 @@ final class Cron
|
|||||||
try {
|
try {
|
||||||
Notification::notifyUser(
|
Notification::notifyUser(
|
||||||
$user,
|
$user,
|
||||||
$_ENV['appName'] . '-你的剩余流量过低',
|
$_ENV['appName'] . ' - 你的剩余流量过低',
|
||||||
'你好,系统发现你剩余流量已经低于 ' . $_ENV['notify_limit_value'] . $unit_text . ' 。',
|
'你好,系统发现你剩余流量已经低于 ' . $_ENV['notify_limit_value'] . $unit_text . ' 。',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -324,28 +324,28 @@ final class Cron
|
|||||||
if ($node->getNodeOnlineStatus() === 1 && $node->online === 0) {
|
if ($node->getNodeOnlineStatus() === 1 && $node->online === 0) {
|
||||||
echo 'Send Node Online Email to admin user' . PHP_EOL;
|
echo 'Send Node Online Email to admin user' . PHP_EOL;
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
Notification::notifyAdmin(
|
// Notification::notifyAdmin(
|
||||||
$_ENV['appName'] . '-系统提示',
|
// $_ENV['appName'] . ' - 系统提示',
|
||||||
'管理员你好,系统发现节点 ' . $node->name . ' 恢复上线了。'
|
// '管理员你好,系统发现节点 ' . $node->name . ' 恢复上线了。'
|
||||||
);
|
// );
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (Config::obtain('telegram_node_online')) {
|
// if (Config::obtain('telegram_node_online')) {
|
||||||
$notice_text = str_replace(
|
// $notice_text = str_replace(
|
||||||
'%node_name%',
|
// '%node_name%',
|
||||||
$node->name,
|
// $node->name,
|
||||||
Config::obtain('telegram_node_online_text')
|
// Config::obtain('telegram_node_online_text')
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
(new Telegram())->send(0, $notice_text);
|
// (new Telegram())->send(0, $notice_text);
|
||||||
} catch (TelegramSDKException $e) {
|
// } catch (TelegramSDKException $e) {
|
||||||
echo $e->getMessage();
|
// echo $e->getMessage();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
$node->online = 1;
|
$node->online = 1;
|
||||||
$node->save();
|
$node->save();
|
||||||
|
|||||||
@ -51,24 +51,24 @@ final class Detect
|
|||||||
echo '检测到节点 #' . $node->id . ' 被 GFW 封锁' . PHP_EOL;
|
echo '检测到节点 #' . $node->id . ' 被 GFW 封锁' . PHP_EOL;
|
||||||
echo 'Send gfw mail to admin' . PHP_EOL;
|
echo 'Send gfw mail to admin' . PHP_EOL;
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
Notification::notifyAdmin(
|
// Notification::notifyAdmin(
|
||||||
$_ENV['appName'] . '-系统警告',
|
// $_ENV['appName'] . '-系统警告',
|
||||||
'管理员你好,系统发现节点 ' . $node->name . ' 被墙了。'
|
// '管理员你好,系统发现节点 ' . $node->name . ' 被墙了。'
|
||||||
);
|
// );
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (Config::obtain('telegram_node_gfwed')) {
|
// if (Config::obtain('telegram_node_gfwed')) {
|
||||||
$notice_text = str_replace(
|
// $notice_text = str_replace(
|
||||||
'%node_name%',
|
// '%node_name%',
|
||||||
$node->name,
|
// $node->name,
|
||||||
Config::obtain('telegram_node_gfwed_text')
|
// Config::obtain('telegram_node_gfwed_text')
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
(new Telegram())->send(0, $notice_text);
|
// (new Telegram())->send(0, $notice_text);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$node->gfw_block = true;
|
$node->gfw_block = true;
|
||||||
$node->save();
|
$node->save();
|
||||||
@ -80,24 +80,24 @@ final class Detect
|
|||||||
echo '检测到节点 #' . $node->id . ' 被 GFW 解除封锁' . PHP_EOL;
|
echo '检测到节点 #' . $node->id . ' 被 GFW 解除封锁' . PHP_EOL;
|
||||||
echo 'Send gfw mail to admin' . PHP_EOL;
|
echo 'Send gfw mail to admin' . PHP_EOL;
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
Notification::notifyAdmin(
|
// Notification::notifyAdmin(
|
||||||
$_ENV['appName'] . '-系统提示',
|
// $_ENV['appName'] . '-系统提示',
|
||||||
'管理员你好,系统发现节点 ' . $node->name . ' 溜出墙了。'
|
// '管理员你好,系统发现节点 ' . $node->name . ' 溜出墙了。'
|
||||||
);
|
// );
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (Config::obtain('telegram_node_ungfwed')) {
|
// if (Config::obtain('telegram_node_ungfwed')) {
|
||||||
$notice_text = str_replace(
|
// $notice_text = str_replace(
|
||||||
'%node_name%',
|
// '%node_name%',
|
||||||
$node->name,
|
// $node->name,
|
||||||
Config::obtain('telegram_node_ungfwed_text')
|
// Config::obtain('telegram_node_ungfwed_text')
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
(new Telegram())->send(0, $notice_text);
|
// (new Telegram())->send(0, $notice_text);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$node->gfw_block = false;
|
$node->gfw_block = false;
|
||||||
$node->save();
|
$node->save();
|
||||||
|
|||||||
@ -22,7 +22,7 @@ final class Password
|
|||||||
|
|
||||||
$redis->setex('password_reset:' . $token, Config::obtain('email_password_reset_ttl'), $email);
|
$redis->setex('password_reset:' . $token, Config::obtain('email_password_reset_ttl'), $email);
|
||||||
|
|
||||||
$subject = $_ENV['appName'] . '-重置密码';
|
$subject = $_ENV['appName'] . ' - 重置密码';
|
||||||
$resetUrl = $_ENV['baseUrl'] . '/password/token/' . $token;
|
$resetUrl = $_ENV['baseUrl'] . '/password/token/' . $token;
|
||||||
|
|
||||||
Mail::send(
|
Mail::send(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user