chore: add null check for remotePartyId before ignoring reject/hangup

This commit is contained in:
Karthikeyan S 2023-11-20 10:43:20 +05:30
parent 6b9be63a4d
commit f4b0a629c7
No known key found for this signature in database
GPG Key ID: 4F1848CCEEF73BCD
1 changed files with 2 additions and 2 deletions

View File

@ -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;