精简座驾文字播报身份信息

This commit is contained in:
pllx
2026-04-30 11:14:53 +08:00
parent 522eea72f6
commit 575e92e03f
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ class RideService
'ride_icon' => (string) ($item->icon ?? '🚘'),
'effect_title' => "{$user->username} 乘坐【{$item->name}】闪亮登场",
'effect_user_info' => $effectUserInfo,
'identity_text' => ChatContentSanitizer::htmlText($effectUserInfo),
'identity_text' => ChatContentSanitizer::htmlText($identitySummary['inline']),
'welcome_text' => ChatContentSanitizer::htmlText($rendered),
];
}
+4 -2
View File
@@ -1137,7 +1137,8 @@ class ChatControllerTest extends TestCase
$this->assertSame("{$user->username} 乘坐【歼-35测试座驾】闪亮登场", $rideMessage['effect_title']);
$this->assertSame("用户 {$user->username} · 部门 无部门 · 职务 无职务 · 会员 普通会员", $rideMessage['effect_user_info']);
$this->assertStringContainsString($user->username, $rideMessage['content']);
$this->assertStringContainsString("用户 {$user->username} · 部门 无部门 · 职务 无职务 · 会员 普通会员", $rideMessage['content']);
$this->assertStringContainsString('部门 无部门 · 职务 无职务 · 会员 普通会员', $rideMessage['content']);
$this->assertStringNotContainsString("用户 {$user->username} · 部门 无部门", $rideMessage['content']);
$this->assertSame('j35', $response->viewData('initialRideEffect'));
$this->assertSame([
'effect_title' => "{$user->username} 乘坐【歼-35测试座驾】闪亮登场",
@@ -1214,7 +1215,8 @@ class ChatControllerTest extends TestCase
$this->assertNotNull($rideMessage);
$this->assertNull($vipPresenceMessage);
$this->assertStringContainsString("用户 {$user->username} · 部门 战备部 · 职务 🛡️ 试飞官 · 会员 👑 至尊会员", $rideMessage['content']);
$this->assertStringContainsString('部门 战备部 · 职务 🛡️ 试飞官 · 会员 👑 至尊会员', $rideMessage['content']);
$this->assertStringNotContainsString("用户 {$user->username} · 部门 战备部", $rideMessage['content']);
$this->assertSame("用户 {$user->username} · 部门 战备部 · 职务 🛡️ 试飞官 · 会员 👑 至尊会员", $rideMessage['effect_user_info']);
$this->assertStringContainsString($user->username, $rideMessage['content']);
$this->assertSame('99a', $response->viewData('initialRideEffect'));