From 2a68af4077b194677b0e3d831f206f2b9a0000bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:18:09 +0200 Subject: [PATCH] fix(events): stuck on processing calling events (#2145) * fix(events): stuck on processing calling events (#2144) * ci: trigger build --------- Co-authored-by: Vitor Hugo Schwaab --- .../feature/call/scenario/OnConfigRequest.kt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/feature/call/scenario/OnConfigRequest.kt b/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/feature/call/scenario/OnConfigRequest.kt index 7b3e1ff2c20..795ff2a66a8 100644 --- a/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/feature/call/scenario/OnConfigRequest.kt +++ b/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/feature/call/scenario/OnConfigRequest.kt @@ -40,12 +40,22 @@ class OnConfigRequest( callingScope.launch { callRepository.getCallConfigResponse(limit = null) .fold({ - callingLogger.i("[OnConfigRequest] - Error: $it") - // TODO: Add a better way to handle the Core Failure? + callingLogger.w("[OnConfigRequest] - Error: $it") + // We can call config_update with an error if there was a connectivity issue + // AVS will eventually ask us again for the config + // TODO(improvement): We can retry it ourselves and improve the app responsiveness. + // Maybe add a retry mechanism that listens for the network state + // Caches the config string and exposes a "invalidate" function + // That we could call when AVS requests new config. + calling.wcall_config_update( + inst = inst, + error = 1, + jsonString = "" + ) }, { config -> calling.wcall_config_update( inst = inst, - error = 0, // TODO(calling): http error from internal json + error = 0, jsonString = config ) callingLogger.i("[OnConfigRequest] - wcall_config_update()")