Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ class MatrixLivekitBackend {
final fociUrl = await getFociUrl();

if (fociUrl.isEmpty) {
Log.e("Failed to find a valid LiveKit service");
return null;
throw Exception("Failed to find a valid LiveKit service");
}

final selectedFocus = fociUrl.first;
Expand All @@ -114,8 +113,7 @@ class MatrixLivekitBackend {
.requestOpenIdToken(room.matrixRoom.client.userID!, {});

if (selectedFocus.scheme != "https") {
Log.e("Selected focus jwt does not use https");
return null;
throw Exception("Selected focus JWT does not use HTTPS");
}

Log.d("Received token from homeserver: ${token}");
Expand All @@ -133,8 +131,7 @@ class MatrixLivekitBackend {

var result = await http.post(uri, body: jsonEncode(body));
if (result.statusCode != 200) {
Log.e("Failed to get sfu!");
return null;
throw Exception("Failed to get sfu! HTTP Error ${result.statusCode}");
}

var data = jsonDecode(result.body) as Map<String, dynamic>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MatrixVoipRoomComponent
@override
Future<VoipSession?> joinCall() async {
currentSession = await backend.join();
currentSession!.onStateChanged.listen(onStateChanged);
currentSession?.onStateChanged.listen(onStateChanged);
return currentSession;
}

Expand Down