Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions lib/features/call/bloc/call_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,28 @@ class CallBloc extends Bloc<CallEvent, CallState> with WidgetsBindingObserver im
_logger.infoPretty(event.jsep?.sdp, tag: '__onCallSignalingEventIncoming');

final handle = CallkeepHandle.number(event.caller);

if (event.jsep != null) {
final waitingCall = state.retrieveActiveCall(event.callId);
if (waitingCall != null && waitingCall.incomingOffer == null) {
final s = waitingCall.processingStatus;
if (s == CallProcessingStatus.incomingFromPush ||
s == CallProcessingStatus.incomingSubmittedAnswer ||
s == CallProcessingStatus.incomingPerformingStarted) {
_logger.info(
'__onCallSignalingEventIncoming: fast-pathing offer to awaiting push call — '
'callId=${event.callId} status=$s',
);
emit(
state.copyWithMappedActiveCall(
event.callId,
(call) => call.copyWith(incomingOffer: event.jsep, line: event.line),
),
);
}
}
}

final contactName = await contactNameResolver.resolveWithNumber(handle.value);
final displayName = contactName ?? (event.callerDisplayName?.isEmpty == true ? null : event.callerDisplayName);

Expand Down
Loading