fix ui dm chatid lowercase normalization

This commit is contained in:
AidarKC
2026-06-21 12:27:41 +04:00
parent c8ffb6cf29
commit 2a834f1b14
6 changed files with 56 additions and 23 deletions
+2 -1
View File
@@ -29,6 +29,7 @@ import {
addSignedMessageToChat,
markIncomingReadByBaseKey,
markOutgoingReadByBaseKey,
normalizeDmChatId,
setContacts,
} from './state.js';
@@ -912,7 +913,7 @@ async function init() {
const fromLogin = parsed.fromLogin || '';
const toLogin = parsed.toLogin || '';
const messageType = Number(parsed.messageType || 0);
const chatId = messageType === 2 ? toLogin : fromLogin;
const chatId = normalizeDmChatId(messageType === 2 ? toLogin : fromLogin);
const text = (messageType === 1 || messageType === 2)
? String(parsed.text || '')
: '';