print call record when declining a call

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 88d34b6c4b
commit 1f9f066fa9

@ -134,7 +134,7 @@ CHECKOUT OPTIONS:
:commit: 521686c112bbae7a762f85d52b1e41eeb1760772 :commit: 521686c112bbae7a762f85d52b1e41eeb1760772
:git: https://github.com/WhisperSystems/JSQMessagesViewController.git :git: https://github.com/WhisperSystems/JSQMessagesViewController.git
SignalServiceKit: SignalServiceKit:
:commit: 04ef06ce95d553116d6b53984f0dcf9429ab78f4 :commit: 1fc5f7728613b7cc3f498d4e0fcccc5f8389b0a1
:git: https://github.com/WhisperSystems/SignalServiceKit.git :git: https://github.com/WhisperSystems/SignalServiceKit.git
SocketRocket: SocketRocket:
:commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf

@ -733,7 +733,7 @@ protocol CallServiceObserver: class {
} }
/** /**
* User chose to answer call referrred to by call `localId`. Used by the Callee only. * User chose to answer call referred to by call `localId`. Used by the Callee only.
* *
* Used by notification actions which can't serialize a call object. * Used by notification actions which can't serialize a call object.
*/ */
@ -758,7 +758,7 @@ protocol CallServiceObserver: class {
} }
/** /**
* User chose to answer call referrred to by call `localId`. Used by the Callee only. * User chose to answer call referred to by call `localId`. Used by the Callee only.
*/ */
public func handleAnswerCall(_ call: SignalCall) { public func handleAnswerCall(_ call: SignalCall) {
AssertIsOnMainThread() AssertIsOnMainThread()
@ -857,7 +857,14 @@ protocol CallServiceObserver: class {
Logger.info("\(TAG) in \(#function): \(call.identifiersForLogs).") Logger.info("\(TAG) in \(#function): \(call.identifiersForLogs).")
// TODO make call record. if let callRecord = call.callRecord {
assertionFailure("Not expecting callrecord to already be set")
callRecord.updateCallType(RPRecentCallTypeIncomingDeclined)
} else {
let callRecord = TSCall(timestamp: NSDate.ows_millisecondTimeStamp(), withCallNumber: call.remotePhoneNumber, callType: RPRecentCallTypeIncomingDeclined, in: call.thread)
callRecord.save()
call.callRecord = callRecord
}
// Currently we just handle this as a hangup. But we could offer more descriptive action. e.g. DataChannel message // Currently we just handle this as a hangup. But we could offer more descriptive action. e.g. DataChannel message
handleLocalHungupCall(call) handleLocalHungupCall(call)

@ -643,6 +643,9 @@
/* notification body */ /* notification body */
"INCOMING_CALL_FROM" = "Incoming call from %@"; "INCOMING_CALL_FROM" = "Incoming call from %@";
/* info message recorded in conversation history when local user declined a call */
"INCOMING_DECLINED_CALL" = "You declined a call";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"INCOMING_INCOMPLETE_CALL" = "Incomplete incoming call from"; "INCOMING_INCOMPLETE_CALL" = "Incomplete incoming call from";

Loading…
Cancel
Save