Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]MissingPermission error thrown when connectUser shouldn't be called #525

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading