From 7d910628495d51dd3fcf3e88ac470a42e96a7935 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 12 Jan 2021 13:43:34 +1100 Subject: [PATCH 1/3] Fix voice messages not playing if device is muted --- SessionMessagingKit/Utilities/OWSAudioPlayer.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SessionMessagingKit/Utilities/OWSAudioPlayer.m b/SessionMessagingKit/Utilities/OWSAudioPlayer.m index 2656a5b1e..c22e1cd97 100644 --- a/SessionMessagingKit/Utilities/OWSAudioPlayer.m +++ b/SessionMessagingKit/Utilities/OWSAudioPlayer.m @@ -115,6 +115,8 @@ NS_ASSUME_NONNULL_BEGIN self.delegate.audioPlaybackState = AudioPlaybackState_Playing; + [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil]; + if (!self.audioPlayer) { NSError *error; self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:self.mediaUrl error:&error]; From 651de37cf21a42c9df553ae36a5cd79ffccc5b24 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 12 Jan 2021 13:43:46 +1100 Subject: [PATCH 2/3] Remove incorrect debug assertion --- SessionMessagingKit/Jobs/JobQueue.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/SessionMessagingKit/Jobs/JobQueue.swift b/SessionMessagingKit/Jobs/JobQueue.swift index 0e1285245..d6f5b8066 100644 --- a/SessionMessagingKit/Jobs/JobQueue.swift +++ b/SessionMessagingKit/Jobs/JobQueue.swift @@ -2,7 +2,6 @@ import SessionUtilitiesKit @objc(SNJobQueue) public final class JobQueue : NSObject, JobDelegate { - private var hasResumedPendingJobs = false // Just for debugging @objc public static let shared = JobQueue() @@ -21,12 +20,6 @@ public final class JobQueue : NSObject, JobDelegate { } @objc public func resumePendingJobs() { - if hasResumedPendingJobs { - #if DEBUG - preconditionFailure("resumePendingJobs() should only be called once.") - #endif - } - hasResumedPendingJobs = true let allJobTypes: [Job.Type] = [ AttachmentDownloadJob.self, AttachmentUploadJob.self, MessageReceiveJob.self, MessageSendJob.self, NotifyPNServerJob.self ] allJobTypes.forEach { type in let allPendingJobs = SNMessagingKitConfiguration.shared.storage.getAllPendingJobs(of: type) From 129f7fc0ed6b88c4ab94a703392392bfcb64acb2 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 12 Jan 2021 13:43:52 +1100 Subject: [PATCH 3/3] Update copy --- Session/Meta/Session-Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Session/Meta/Session-Info.plist b/Session/Meta/Session-Info.plist index f77e55a0b..57208fbc2 100644 --- a/Session/Meta/Session-Info.plist +++ b/Session/Meta/Session-Info.plist @@ -65,9 +65,9 @@ NSContactsUsageDescription Signal uses your contacts to find users you know. We do not store your contacts on the server. NSFaceIDUsageDescription - Session's Screen Lock feature uses Face ID. + Session's Screen Lock feature uses Face ID. NSMicrophoneUsageDescription - Session needs access to your microphone to record videos. + Session needs access to your microphone to record media. NSPhotoLibraryAddUsageDescription Session needs access to your library to save photos. NSPhotoLibraryUsageDescription