From ec8d1e31d145077138aa2bf19422062a3a042ba3 Mon Sep 17 00:00:00 2001 From: marcus-daily <111281783+marcus-daily@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:59:36 +0000 Subject: [PATCH] Make AuthBundle nullable --- .../main/java/ai/pipecat/client/daily/DailyTransport.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pipecat-client-android-daily/src/main/java/ai/pipecat/client/daily/DailyTransport.kt b/pipecat-client-android-daily/src/main/java/ai/pipecat/client/daily/DailyTransport.kt index f407c75..a7cd13f 100644 --- a/pipecat-client-android-daily/src/main/java/ai/pipecat/client/daily/DailyTransport.kt +++ b/pipecat-client-android-daily/src/main/java/ai/pipecat/client/daily/DailyTransport.kt @@ -237,9 +237,16 @@ class DailyTransport( } } - override fun connect(authBundle: AuthBundle): Future = + override fun connect(authBundle: AuthBundle?): Future = thread.runOnThreadReturningFuture { + if (authBundle == null) { + return@runOnThreadReturningFuture resolvedPromiseErr( + thread, + RTVIError.OtherError("Auth request cannot be skipped -- please ensure baseUrl and a connect endpoint are set") + ) + } + Log.i(TAG, "connect(${authBundle.data})") val dailyBundle = try {