From f4b0a629c703094137a9df1482dced3b3056fcc4 Mon Sep 17 00:00:00 2001 From: Karthikeyan S Date: Mon, 20 Nov 2023 10:43:20 +0530 Subject: [PATCH] chore: add null check for remotePartyId before ignoring reject/hangup --- lib/src/voip/voip.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/voip/voip.dart b/lib/src/voip/voip.dart index d63ef2b4..f9ee1d17 100644 --- a/lib/src/voip/voip.dart +++ b/lib/src/voip/voip.dart @@ -345,7 +345,7 @@ class VoIP { 'Ignoring call hangup for room $roomId claiming to be for call in room ${call.room.id}'); return; } - if (call.remotePartyId != partyId) { + if (call.remotePartyId != null && call.remotePartyId != partyId) { Logs().w( 'Ignoring call hangup from sender with a different party_id $partyId for call in room ${call.room.id}'); return; @@ -374,7 +374,7 @@ class VoIP { 'Ignoring call reject for room $roomId claiming to be for call in room ${call.room.id}'); return; } - if (call.remotePartyId != partyId) { + if (call.remotePartyId != null && call.remotePartyId != partyId) { Logs().w( 'Ignoring call reject from sender with a different party_id $partyId for call in room ${call.room.id}'); return;