diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dcbdffab..fe2437697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### 🔄 Changed - Updated the default sorting for Participants during a call to minimize the movement of already visible tiles [#515](https://github.com/GetStream/stream-video-swift/pull/515) +### 🐞 Fixed +- An `MissingPermissions` error was thrown when creating a `StreamVideo` with anonymous user type. [#525](https://github.com/GetStream/stream-video-swift/pull/525) + # [1.10.0](https://github.com/GetStream/stream-video-swift/releases/tag/1.10.0) _August 29, 2024_ diff --git a/DemoApp/Sources/Components/Router.swift b/DemoApp/Sources/Components/Router.swift index 868382749..b98606939 100644 --- a/DemoApp/Sources/Components/Router.swift +++ b/DemoApp/Sources/Components/Router.swift @@ -231,7 +231,11 @@ final class Router: ObservableObject { utils.userListProvider = appState streamVideoUI = StreamVideoUI(streamVideo: streamVideo, utils: utils) - appState.connectUser() + if user?.type != .anonymous { + appState.connectUser() + } else { + appState.loading = false + } } private func refreshToken( diff --git a/Sources/StreamVideo/StreamVideo.swift b/Sources/StreamVideo/StreamVideo.swift index 94da6b3b6..a3143c9d3 100644 --- a/Sources/StreamVideo/StreamVideo.swift +++ b/Sources/StreamVideo/StreamVideo.swift @@ -189,7 +189,7 @@ public class StreamVideo: ObservableObject, @unchecked Sendable { } catch { log.error("Error connecting as guest", error: error) } - } else { + } else if user.type != .anonymous { do { try Task.checkCancellation() try await self.connectUser(isInitial: true)