Skip to content

Commit 5b8fb49

Browse files
committed
Merge branch 'develop' into fix/callsettings-rapid-updates
# Conflicts: # CHANGELOG.md # Sources/StreamVideo/Utils/AudioSession/AudioRecorder/Extensions/AVAudioRecorder+Convenience.swift # Sources/StreamVideo/Utils/Store/Middleware.swift # StreamVideoTests/Utils/Store/Store_PerformanceTests.swift
2 parents 876bfe5 + 2f867a8 commit 5b8fb49

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Sources/StreamVideo/Utils/AudioSession/AudioRecorder/Extensions/AVAudioRecorder+Convenience.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ extension AVAudioRecorder {
8888
]
8989
) throws -> AVAudioRecorder {
9090
// Get the cache directory for temporary audio storage
91-
let documentPath = FileManager.default.urls(
92-
for: .cachesDirectory,
93-
in: .userDomainMask
94-
)[0]
95-
91+
guard
92+
let documentPath = FileManager.default.urls(
93+
for: .cachesDirectory,
94+
in: .userDomainMask
95+
).first
96+
else {
97+
throw ClientError("No cache directory available.")
98+
}
99+
96100
// Construct the full file URL
97101
let fileURL = documentPath.appendingPathComponent(filename)
98102

Sources/StreamVideo/Utils/Store/Middleware.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Copyright © 2025 Stream.io Inc. All rights reserved.
33
//
44

5-
/// Base class for store middleware that intercept actions for side effects.
5+
/// Base class for store middleware that intercepts actions for side effects.
66
///
7-
/// Middleware sit between action dispatch and state reduction, allowing you
7+
/// Middleware sits between action dispatch and state reduction, allowing you
88
/// to:
99
/// - Perform asynchronous operations
1010
/// - Dispatch additional actions
@@ -14,7 +14,7 @@
1414
///
1515
/// ## Architecture
1616
///
17-
/// Middleware receive actions before reducers process them. They can:
17+
/// Middleware receives actions before reducers process them. They can:
1818
/// 1. Perform side effects (API calls, timers, etc.)
1919
/// 2. Dispatch new actions via the `dispatcher`
2020
/// 3. Access current state via the `state` property

0 commit comments

Comments
 (0)