Новое вложение ЗВОНОК теперь отправляется от лица звонящего

This commit is contained in:
RoyceDa
2026-03-22 19:49:59 +02:00
parent a1c8b3d95a
commit 6dc35d7cca
3 changed files with 15 additions and 16 deletions

View File

@@ -462,21 +462,18 @@ export function CallProvider(props : CallProviderProps) {
* Отправляет сообщение в диалог с звонящим с информацией о звонке
*/
const generateCallAttachment = () => {
let preview = "";
if(roleRef.current == CallRole.CALLER){
preview += "1::";
if(roleRef.current != CallRole.CALLER){
/**
* Только звонящий отправляет информацию о звонке в виде вложения, чтобы ее можно было отобразить в UI диалога, например длительность звонка
*/
return;
}
if(roleRef.current == CallRole.CALLEE){
preview += "0::";
}
preview += duration.toString();
sendMessage(activeCall, "", [{
id: generateRandomKey(16),
preview: preview,
preview: duration.toString(),
type: AttachmentType.CALL,
blob: ""
}], false);
}], true);
}
const accept = () => {