Fix logging for in call close confirmation

This commit is contained in:
ayumi-signal 2024-06-11 10:29:43 -07:00 committed by GitHub
parent 041347e30d
commit 9b781826a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 18 deletions

View file

@ -421,15 +421,15 @@ ipc.on('get-ready-for-shutdown', async () => {
});
ipc.on('maybe-request-close-confirmation', async () => {
const { maybeRequestCloseConfirmation } = window.Events;
if (!maybeRequestCloseConfirmation) {
const { getIsInCall, requestCloseConfirmation } = window.Events;
if (!getIsInCall || !getIsInCall() || !requestCloseConfirmation) {
ipc.send('received-close-confirmation', true);
return;
}
log.info('Requesting close confirmation.');
ipc.send('requested-close-confirmation');
const result = await maybeRequestCloseConfirmation();
const result = await requestCloseConfirmation();
ipc.send('received-close-confirmation', result);
});