fix: 赚钱广播改为系统播报风格,白名单同步更新
This commit is contained in:
@@ -348,7 +348,7 @@ class ChatController extends Controller
|
|||||||
|
|
||||||
// 0.5 检查接收方是否在线(防幽灵消息)
|
// 0.5 检查接收方是否在线(防幽灵消息)
|
||||||
$toUser = $data['to_user'] ?? '大家';
|
$toUser = $data['to_user'] ?? '大家';
|
||||||
if ($toUser !== '大家' && ! in_array($toUser, ['系统公告', '系统传音', '送花播报', '进出播报', '钓鱼播报', '星海小博士', 'AI小班长'])) {
|
if ($toUser !== '大家' && ! in_array($toUser, ['系统公告', '系统传音', '系统播报', '送花播报', '进出播报', '钓鱼播报', '星海小博士', 'AI小班长'])) {
|
||||||
// Redis 保存的在线列表
|
// Redis 保存的在线列表
|
||||||
$isOnline = Redis::hexists("room:{$id}:users", $toUser);
|
$isOnline = Redis::hexists("room:{$id}:users", $toUser);
|
||||||
if (! $isOnline) {
|
if (! $isOnline) {
|
||||||
@@ -933,7 +933,7 @@ class ChatController extends Controller
|
|||||||
private function grantChatCharm(mixed $sender, string $toUsername): void
|
private function grantChatCharm(mixed $sender, string $toUsername): void
|
||||||
{
|
{
|
||||||
// 系统用户不参与魅力计算
|
// 系统用户不参与魅力计算
|
||||||
$systemNames = ['大家', '系统传音', '系统公告', '钓鱼播报', '星海小博士', 'AI小班长', '送花播报'];
|
$systemNames = ['大家', '系统传音', '系统公告', '系统播报', '钓鱼播报', '星海小博士', 'AI小班长', '送花播报'];
|
||||||
if (in_array($toUsername, $systemNames)) {
|
if (in_array($toUsername, $systemNames)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,11 +104,11 @@ class EarnController extends Controller
|
|||||||
$sysMsg = [
|
$sysMsg = [
|
||||||
'id' => $this->chatState->nextMessageId($roomId),
|
'id' => $this->chatState->nextMessageId($roomId),
|
||||||
'room_id' => $roomId,
|
'room_id' => $roomId,
|
||||||
'from_user' => '金币任务',
|
'from_user' => '系统播报',
|
||||||
'to_user' => '大家',
|
'to_user' => '大家',
|
||||||
'content' => "👍 【{$user->username}】刚刚看视频赚取了 {$rewardCoins} 金币 + {$rewardExp} 经验!{$promoTag}",
|
'content' => "👍 【{$user->username}】刚刚看视频赚取了 {$rewardCoins} 金币 + {$rewardExp} 经验!{$promoTag}",
|
||||||
'is_secret' => false,
|
'is_secret' => false,
|
||||||
'font_color' => '#d97706',
|
'font_color' => '#16a34a',
|
||||||
'action' => '',
|
'action' => '',
|
||||||
'sent_at' => now()->toDateTimeString(),
|
'sent_at' => now()->toDateTimeString(),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user