Skip to content

Commit

Permalink
fixup! fix(notifications): check once if call notification is valid (…
Browse files Browse the repository at this point in the history
…not missed)

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Dec 6, 2024
1 parent b51bb90 commit 683788b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/callbox/renderer/callbox.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ async function hasCurrentUserJoinedCall(token: string) {
export async function checkCurrentUserHasPendingCall(token: string): Promise<boolean> {
try {
const response = await hasCurrentUserJoinedCall(token)
if (response === null) {
return false
}
return !response
} catch (e) {
if (e instanceof Error && e.cause === MISSED_CALL) {
console.debug(e)
} else {
console.warn('Error while checking if the user has pending call', e)
}
console.warn('Error while checking if the user has pending call', e)
return false
}
}
Expand Down

0 comments on commit 683788b

Please sign in to comment.