修复座驾与会员入场重复展示

This commit is contained in:
pllx
2026-04-30 11:03:09 +08:00
parent 221f629ec2
commit 3eaf37a648
3 changed files with 82 additions and 3 deletions
+3
View File
@@ -28,6 +28,7 @@ class RideService
*/
public function __construct(
private readonly UserCurrencyService $currencyService,
private readonly ChatUserPresenceService $chatUserPresenceService,
) {}
/**
@@ -234,12 +235,14 @@ class RideService
'{name}' => $user->username,
'{ride}' => $item->name,
]);
$identitySummary = $this->chatUserPresenceService->buildIdentitySummary($user);
return [
'ride_key' => $rideKey,
'ride_name' => $item->name,
'ride_icon' => (string) ($item->icon ?? '🚘'),
'effect_title' => "{$user->username} 乘坐【{$item->name}】闪亮登场",
'identity_text' => ChatContentSanitizer::htmlText($identitySummary['inline']),
'welcome_text' => ChatContentSanitizer::htmlText($rendered),
];
}