SHA256
Добавить ответы в DM и обновить UI чатов
This commit is contained in:
@@ -27,6 +27,7 @@ let toneFlip = false;
|
||||
const DEFAULT_ICE_SERVERS = Object.freeze([
|
||||
{ urls: 'stun:stun.l.google.com:19302' },
|
||||
]);
|
||||
const CALL_SUMMARY_MIN_TOTAL_MS = 5000;
|
||||
|
||||
function nowMs() {
|
||||
return Date.now();
|
||||
@@ -167,6 +168,8 @@ async function applyLocalOutgoingDmCopy(peerLogin, result) {
|
||||
|
||||
async function sendOutgoingCallSummaryDm(call, summaryCode) {
|
||||
if (!call || call.direction !== 'out' || !call.peerLogin) return;
|
||||
const totalMs = Math.max(0, nowMs() - Number(call.startedAtMs || nowMs()));
|
||||
if (totalMs < CALL_SUMMARY_MIN_TOTAL_MS) return;
|
||||
const text = buildOutgoingCallSummaryText(call, summaryCode);
|
||||
if (!text) return;
|
||||
const login = String(state?.session?.login || '').trim();
|
||||
|
||||
Reference in New Issue
Block a user