Calls: Various fixes (#1964)
This commit is contained in:
parent
31834d56b5
commit
9533ed449b
@ -276,7 +276,7 @@ export async function requestCall({
|
||||
}));
|
||||
|
||||
if (!result) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
const call = buildPhoneCall(result.phoneCall);
|
||||
@ -285,6 +285,8 @@ export async function requestCall({
|
||||
'@type': 'updatePhoneCall',
|
||||
call,
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
export function setCallRating({
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
.meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
left: -3px;
|
||||
}
|
||||
|
||||
.duration {
|
||||
|
||||
@ -212,7 +212,7 @@ addActionHandler('connectToActiveGroupCall', async (global, actions) => {
|
||||
}
|
||||
});
|
||||
|
||||
addActionHandler('connectToActivePhoneCall', async (global) => {
|
||||
addActionHandler('connectToActivePhoneCall', async (global, actions) => {
|
||||
const { phoneCall } = global;
|
||||
|
||||
if (!phoneCall) return;
|
||||
@ -229,7 +229,11 @@ addActionHandler('connectToActivePhoneCall', async (global) => {
|
||||
|
||||
const gAHash = await callApi('requestPhoneCall', [dhConfig])!;
|
||||
|
||||
await callApi('requestCall', { user, gAHash, isVideo: phoneCall.isVideo });
|
||||
const result = await callApi('requestCall', { user, gAHash, isVideo: phoneCall.isVideo });
|
||||
|
||||
if (!result) {
|
||||
actions.hangUp();
|
||||
}
|
||||
});
|
||||
|
||||
addActionHandler('acceptCall', async (global) => {
|
||||
|
||||
@ -73,6 +73,7 @@ addActionHandler('apiUpdate', (global, actions, update) => {
|
||||
|
||||
if (phoneCall) {
|
||||
if (call.state === 'discarded') {
|
||||
actions.playGroupCallSound({ sound: 'end' });
|
||||
return {
|
||||
...global,
|
||||
...(call.needRating && { ratingPhoneCall: call }),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user