File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2424
2525#import " MXCallStackCall.h"
2626#import " MXCallHangupEventContent.h"
27+ #import " MXCallInviteEventContent.h"
2728
2829NS_ASSUME_NONNULL_BEGIN
2930
@@ -125,6 +126,12 @@ extern NSString *const kMXCallSupportsTransferringStatusDidChange;
125126 */
126127- (void )handleCallEvent : (MXEvent *)event ;
127128
129+ /* *
130+ Update call id from invite content
131+
132+ @param event the call event coming from the event stream.
133+ */
134+ - (void )updateCallId : (MXCallInviteEventContent*)invite ;
128135
129136#pragma mark - Controls
130137/* *
Original file line number Diff line number Diff line change 2626#import " MXSDKOptions.h"
2727#import " MXEnumConstants.h"
2828
29- #import " MXCallInviteEventContent.h"
3029#import " MXCallAnswerEventContent.h"
3130#import " MXCallSelectAnswerEventContent.h"
3231#import " MXCallCandidatesEventContent.h"
@@ -1102,6 +1101,10 @@ - (void)callStackCallDidConnect:(id<MXCallStackCall>)callStackCall
11021101
11031102#pragma mark - Event Handlers
11041103
1104+ - (void )updateCallId : (MXCallInviteEventContent*)invite {
1105+ _callId = invite.callId ;
1106+ }
1107+
11051108- (void )handleCallInvite : (MXEvent *)event
11061109{
11071110 MXLogDebug (@" [MXCall][%@ ] handleCallInvite" , _callId)
@@ -1121,7 +1124,7 @@ - (void)handleCallInvite:(MXEvent *)event
11211124 return ;
11221125 }
11231126
1124- _callId = callInviteEventContent. callId ;
1127+ [ self updateCallId: callInviteEventContent] ;
11251128 _callerId = event.sender ;
11261129 _callerName = [callManager.mxSession userWithUserId: _callerId].displayname ;
11271130 MXRoom *signalingRoom = [callManager.mxSession roomWithRoomId: event.roomId];
Original file line number Diff line number Diff line change @@ -502,6 +502,8 @@ - (void)handleCallInvite:(MXEvent *)event
502502
503503 if (_callKitAdapter.maximumActiveCalls != -1 && runningCalls >= _callKitAdapter.maximumActiveCalls ) {
504504
505+ MXCallInviteEventContent* callInviteEventContent = [MXCallInviteEventContent modelFromJSON: event.content];
506+ [call updateCallId: callInviteEventContent];
505507 [call hangupWithReason: MXCallHangupReasonUserBusy];
506508
507509 return ;
You can’t perform that action at this time.
0 commit comments