fix(ui): чат метаданные сообщений и корректная раскладка backlog type2

This commit is contained in:
AidarKC
2026-04-23 13:41:13 +03:00
parent 78d6124f2a
commit e9f58ca004
4 changed files with 90 additions and 9 deletions
+1 -2
View File
@@ -637,11 +637,10 @@ async function init() {
return;
}
const myLogin = String(state.session.login || '').trim().toLowerCase();
const fromLogin = parsed.fromLogin || '';
const toLogin = parsed.toLogin || '';
const chatId = String(fromLogin || '').toLowerCase() === myLogin ? toLogin : fromLogin;
const messageType = Number(parsed.messageType || 0);
const chatId = messageType === 2 ? toLogin : fromLogin;
const text = (messageType === 1 || messageType === 2)
? new TextDecoder().decode(parsed.payloadBytes || new Uint8Array(0))
: '';