修复新人进房欢迎消息显示
This commit is contained in:
@@ -220,8 +220,9 @@ class ChatStateService
|
||||
|
||||
foreach ($messages as $msgJson) {
|
||||
$msg = json_decode($msgJson, true);
|
||||
// 只要消息里带了 welcome_user 且等于当前用户,就抛弃这条旧的
|
||||
if ($msg && isset($msg['welcome_user']) && $msg['welcome_user'] === $username) {
|
||||
// 只清理普通进出播报,避免误删新人礼包公告和 AI 小班长新人欢迎。
|
||||
$welcomeKind = $msg['welcome_kind'] ?? 'entry_broadcast';
|
||||
if ($msg && isset($msg['welcome_user']) && $msg['welcome_user'] === $username && $welcomeKind === 'entry_broadcast') {
|
||||
continue;
|
||||
}
|
||||
$filtered[] = $msgJson;
|
||||
|
||||
Reference in New Issue
Block a user