【m】消息接收发送

This commit is contained in:
2026-04-11 00:03:30 +08:00
parent e9b7070219
commit 59d4105ed3
29 changed files with 258 additions and 834 deletions

View File

@@ -76,9 +76,9 @@ export function handleChatMessage(data) {
const messageType = isImage ? 'file' : 'text';
// 显示通知
if (!message.isSelf) {
const content = isImage ? '[图片]' : message.content;
showNotification(`${message.senderName}: ${content.substring(0, 20)}${content.length > 20 ? '...' : ''}`);
if (!data.isSelf) {
const content = isImage ? '[图片]' : data.content;
showNotification(`${data.senderName}: ${content.substring(0, 20)}${content.length > 20 ? '...' : ''}`);
}
}