Skip to content

Commit

Permalink
fix(InfnityClient): don't check for host on mute/unmute (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
vadymmarkov authored Oct 20, 2023
1 parent 88d219d commit 934f03c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ final class ConferenceSignalingChannel: SignalingChannel, SignalingEventSender {
func muteAudio(_ muted: Bool) async throws -> Bool {
let token = try await tokenStore.token()

guard token.role == .host else {
return false
}

if muted {
return try await participantService.mute(token: token)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,19 +364,6 @@ final class ConferenceSignalingChannelTests: XCTestCase {
XCTAssertNil(callService.token)
}

func testMuteAudioWhenNotHost() async throws {
participantService.results[.mute] = .success(true)

try await tokenStore.updateToken(.randomToken(role: .guest))
let result = try await channel.muteAudio(false)

XCTAssertFalse(result)
XCTAssertTrue(participantService.actions.isEmpty)
XCTAssertNil(participantService.token)
XCTAssertTrue(callService.actions.isEmpty)
XCTAssertNil(callService.token)
}

func testTakeFloor() async throws {
participantService.results[.takeFloor] = .success(())

Expand Down

0 comments on commit 934f03c

Please sign in to comment.