feat: 欢迎语增加右下角弹窗通知;禁止对「大家」发送欢迎

This commit is contained in:
pllx
2026-04-28 14:40:27 +08:00
parent 55fd770fdd
commit abb5512222
3 changed files with 18 additions and 3 deletions
+2 -2
View File
@@ -370,8 +370,8 @@ export function bindChatEvents() {
window.showVipPresenceBanner(msg);
}
// 若消息携带 toast_notification 字段且当前用户是接收者或为公屏广播,弹右下角小卡片
if (msg.toast_notification && (msg.to_user === window.chatContext?.username || msg.to_user === '大家')) {
// 若消息携带 toast_notification 字段且当前用户是接收者或为公屏广播或为欢迎动作,弹右下角小卡片
if (msg.toast_notification && (msg.to_user === window.chatContext?.username || msg.to_user === '大家' || msg.action === '欢迎')) {
const t = msg.toast_notification;
window.chatToast?.show({
title: t.title || "通知",