diff --git a/Session/Calls/CallAudioService.swift b/Session/Calls/CallAudioService.swift index c0944db83..a05d6005a 100644 --- a/Session/Calls/CallAudioService.swift +++ b/Session/Calls/CallAudioService.swift @@ -278,7 +278,7 @@ protocol CallAudioServiceDelegate: AnyObject { AssertIsOnMainThread() Logger.debug("") - play(sound: .callEnded) + play(sound: .callFailure) handleCallEnded(call: call) } @@ -286,7 +286,7 @@ protocol CallAudioServiceDelegate: AnyObject { AssertIsOnMainThread() Logger.debug("") - play(sound: .callEnded) + play(sound: .callFailure) handleCallEnded(call: call) } @@ -296,7 +296,7 @@ protocol CallAudioServiceDelegate: AnyObject { vibrate() - play(sound: .callEnded) + play(sound: .callFailure) handleCallEnded(call: call) } @@ -316,7 +316,7 @@ protocol CallAudioServiceDelegate: AnyObject { AssertIsOnMainThread() Logger.debug("") - play(sound: .callEnded) + play(sound: .callFailure) handleCallEnded(call: call) } @@ -348,12 +348,12 @@ protocol CallAudioServiceDelegate: AnyObject { stopRinging() } - private func prepareToPlay(sound: OWSStandardSound) -> OWSAudioPlayer? { - guard let newPlayer = OWSSounds.audioPlayer(forSound: sound.rawValue, audioBehavior: .call) else { - owsFailDebug("unable to build player for sound: \(OWSSounds.displayName(forSound: sound.rawValue))") + private func prepareToPlay(sound: OWSSound) -> OWSAudioPlayer? { + guard let newPlayer = OWSSounds.audioPlayer(for: sound, audioBehavior: .call) else { + owsFailDebug("unable to build player for sound: \(OWSSounds.displayName(for: sound))") return nil } - Logger.info("playing sound: \(OWSSounds.displayName(forSound: sound.rawValue))") + Logger.info("playing sound: \(OWSSounds.displayName(for: sound))") // It's important to stop the current player **before** starting the new player. In the case that // we're playing the same sound, since the player is memoized on the sound instance, we'd otherwise @@ -364,7 +364,7 @@ protocol CallAudioServiceDelegate: AnyObject { return newPlayer } - private func play(sound: OWSStandardSound) { + private func play(sound: OWSSound) { guard let newPlayer = prepareToPlay(sound: sound) else { return } newPlayer.play() } diff --git a/Session/Calls/SignalCall.swift b/Session/Calls/SignalCall.swift index 28dca36dc..bf5789869 100644 --- a/Session/Calls/SignalCall.swift +++ b/Session/Calls/SignalCall.swift @@ -109,7 +109,7 @@ public class SignalCall: NSObject, CallManagerCallReference { case messageSendFailure(underlyingError: Error) } - var participantAddresses: [SignalServiceAddress] { + var participantAddresses: [String] { switch mode { case .group(let call): return call.remoteDeviceStates.values.map { $0.address } @@ -132,7 +132,7 @@ public class SignalCall: NSObject, CallManagerCallReference { init(individualCall: IndividualCall) { mode = .individual(individualCall) audioActivity = AudioActivity( - audioDescription: "[SignalCall] with individual \(individualCall.remoteAddress)", + audioDescription: "[SignalCall] with individual \(individualCall.thread.contactSessionID())", behavior: .call ) thread = individualCall.thread @@ -174,7 +174,7 @@ public class SignalCall: NSObject, CallManagerCallReference { public class func incomingIndividualCall( localId: UUID, - remoteAddress: SignalServiceAddress, + publicKey: String, sentAtTimestamp: UInt64, offerMediaType: TSRecentCallOfferType ) -> SignalCall { @@ -195,7 +195,7 @@ public class SignalCall: NSObject, CallManagerCallReference { direction: .incoming, localId: localId, state: .answering, - remoteAddress: remoteAddress, + publicKey: publicKey, sentAtTimestamp: sentAtTimestamp, callAdapterType: callAdapterType )