feat(call-ui): полноценное окно звонка, статусы, звуки и тех-история вызовов

This commit is contained in:
AidarKC
2026-04-22 15:46:45 +03:00
parent c824fb5e9b
commit 29a07a9a8b
6 changed files with 572 additions and 109 deletions
+13
View File
@@ -325,6 +325,19 @@ export function addChatMessage(chatId, text) {
getChatMessages(chatId).push({ from: 'out', text: message, firstTick: false, secondTick: false, unread: false });
}
export function addSystemChatMessage(chatId, text, { from = 'out', kind = 'system' } = {}) {
const message = String(text || '').trim();
if (!message) return;
getChatMessages(chatId).push({
from: from === 'in' ? 'in' : 'out',
text: message,
kind: String(kind || 'system'),
unread: from === 'in',
firstTick: from !== 'in',
secondTick: false,
});
}
export function addIncomingMessage(chatId, text, messageId = '') {
const msg = text?.trim();