fix(android): rebind listener before notification actions

This commit is contained in:
Ayaan Zaidi
2026-02-27 10:01:25 +05:30
committed by Ayaan Zaidi
parent 8807267bfd
commit bbab0b005e
2 changed files with 25 additions and 0 deletions

View File

@@ -55,6 +55,11 @@ class NotificationsHandler private constructor(
}
suspend fun handleNotificationsActions(paramsJson: String?): GatewaySession.InvokeResult {
val snapshot = stateProvider.readSnapshot(appContext)
if (snapshot.enabled && !snapshot.connected) {
stateProvider.requestServiceRebind(appContext)
}
val params = parseParamsObject(paramsJson)
?: return GatewaySession.InvokeResult.error(
code = "INVALID_REQUEST",