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
+6 -4
View File
@@ -10,6 +10,7 @@ import {
markChatRead,
markOutgoingSent,
markReadReceiptSentByBaseKey,
normalizeDmChatId,
authService,
setContacts,
state,
@@ -334,11 +335,12 @@ function renderLog(list, chatId, { onOpenActions } = {}) {
}
export function render({ navigate, route }) {
const chatId = route.params.chatId || 'u1';
const contact = directMessages.find((d) => d.id === chatId) || {
const routeChatId = route.params.chatId || 'u1';
const chatId = normalizeDmChatId(routeChatId) || 'u1';
const contact = directMessages.find((d) => normalizeDmChatId(d.id) === chatId) || {
id: chatId,
name: chatId,
initials: (chatId[0] || '?').toUpperCase(),
name: String(routeChatId || chatId),
initials: (String(routeChatId || chatId)[0] || '?').toUpperCase(),
};
const screen = document.createElement('section');