Skip to content

Commit

Permalink
[Fix]MissingPermission error thrown when connectUser shouldn't be cal…
Browse files Browse the repository at this point in the history
…led (#525)
  • Loading branch information
ipavlidakis authored Sep 18, 2024
1 parent 6e12656 commit b223fdc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_

Expand Down
6 changes: 5 additions & 1 deletion DemoApp/Sources/Components/Router.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion Sources/StreamVideo/StreamVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b223fdc

Please sign in to comment.