From 272b663b0d86832e56a0ccea3656b7f372e8361a Mon Sep 17 00:00:00 2001 From: Joan Cabezas Date: Wed, 7 Aug 2024 14:51:15 -0700 Subject: [PATCH] webhookOnTranscriptReceivedCall validation --- app/lib/backend/http/webhooks.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/backend/http/webhooks.dart b/app/lib/backend/http/webhooks.dart index d915407ea..82eff2d5b 100644 --- a/app/lib/backend/http/webhooks.dart +++ b/app/lib/backend/http/webhooks.dart @@ -45,6 +45,8 @@ Future webhookOnMemoryCreatedCall(ServerMemory? memory, {bool returnRawB } Future webhookOnTranscriptReceivedCall(List segments, String sessionId) async { + // was called twice? + if (segments.isEmpty || SharedPreferencesUtil().webhookOnTranscriptReceived.isEmpty) return ''; debugPrint('webhookOnTranscriptReceivedCall: $segments'); return triggerTranscriptSegmentsRequest(SharedPreferencesUtil().webhookOnTranscriptReceived, sessionId, segments); }