edoctor-sendbird-calls 1.0.1-beta.5 → 1.0.1-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,7 @@ class RNSendBirdCalls: RCTEventEmitter, SendBirdCallDelegate, DirectCallDelegate
43
43
  }
44
44
 
45
45
  private func setupSendBird() {
46
- let userDefaults = UserDefaults(suiteName: "edoctorStorage")
46
+ _ = UserDefaults(suiteName: "edoctorStorage")
47
47
  let appId = "0BEF9C57-BA3B-474E-A40F-62B027AA47F6"
48
48
 
49
49
  let config = SendBirdCall.configure(appId: appId)
@@ -436,9 +436,10 @@ class RNSendBirdCalls: RCTEventEmitter, SendBirdCallDelegate, DirectCallDelegate
436
436
  let isLocalVideoEnabled = call.isLocalVideoEnabled
437
437
  let isLocalAudioEnabled = call.isLocalAudioEnabled
438
438
  let customItems = call.customItems
439
+ let endResult = call.endResult
439
440
 
440
441
  let params: NSMutableDictionary = [
441
- "callId" : callId ?? "",
442
+ "callId" : callId,
442
443
  "duration": duration,
443
444
  "isRemoteAudioEnabled": isRemoteAudioEnabled,
444
445
  "isRemoteVideoEnabled": isRemoteVideoEnabled,
@@ -447,7 +448,8 @@ class RNSendBirdCalls: RCTEventEmitter, SendBirdCallDelegate, DirectCallDelegate
447
448
  "isVideoCall": isVideoCall,
448
449
  "callee" : calleeMap,
449
450
  "caller" : callerMap,
450
- "customItems": customItems ?? [:],
451
+ "customItems": customItems,
452
+ "endResult": endResult,
451
453
  ]
452
454
  return params
453
455
  }
@@ -534,10 +536,10 @@ class RNSendBirdCalls: RCTEventEmitter, SendBirdCallDelegate, DirectCallDelegate
534
536
  print(TAG + "didEnd")
535
537
  CALL_ACTIVE = nil
536
538
  let params = getParamFromDirectCall(call: directCall)
537
- print(self.TAG + "didEnd params: \(directCall)")
539
+ print(self.TAG + "didEnd params: \(params)")
538
540
  sendEventWithName(eventName: RNSendBirdCalls.onEnded, params: params)
539
541
  CXCallManager.shared.endCall(for: callId, endedAt: Date(), reason: directCall.endResult)
540
- guard let callLog = directCall.callLog else { return }
542
+ guard directCall.callLog != nil else { return }
541
543
  }
542
544
 
543
545
  // MARK: - SendBirdRecordingDelegate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edoctor-sendbird-calls",
3
- "version": "1.0.1-beta.5",
3
+ "version": "1.0.1-beta.6",
4
4
  "description": "edoctor-sendbird-calls",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",