mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 02:00:05 +00:00
refactor: discard offer messages from non-matching pre-offers we are already expecting
This commit is contained in:
@@ -325,6 +325,13 @@ class WebRtcCallService: Service(), PeerConnection.Observer {
|
|||||||
|
|
||||||
val callId = getCallId(intent)
|
val callId = getCallId(intent)
|
||||||
val recipient = getRemoteRecipient(intent)
|
val recipient = getRemoteRecipient(intent)
|
||||||
|
val preOffer = callManager.preOfferCallData
|
||||||
|
|
||||||
|
if (callManager.isPreOffer() && (preOffer == null || preOffer.callId != callId || preOffer.recipient != recipient)) {
|
||||||
|
Log.d(TAG, "Incoming ring from non-matching pre-offer")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val offer = intent.getStringExtra(EXTRA_REMOTE_DESCRIPTION) ?: return
|
val offer = intent.getStringExtra(EXTRA_REMOTE_DESCRIPTION) ?: return
|
||||||
val timestamp = intent.getLongExtra(EXTRA_TIMESTAMP, -1)
|
val timestamp = intent.getLongExtra(EXTRA_TIMESTAMP, -1)
|
||||||
setCallInProgressNotification(TYPE_INCOMING_RINGING, recipient)
|
setCallInProgressNotification(TYPE_INCOMING_RINGING, recipient)
|
||||||
|
Reference in New Issue
Block a user