fix(android): allow open and reply on non-clearable notifications

This commit is contained in:
Ayaan Zaidi
2026-02-27 09:54:33 +05:30
committed by Ayaan Zaidi
parent b8373eaddc
commit 8807267bfd
2 changed files with 12 additions and 1 deletions

View File

@@ -182,6 +182,13 @@ class NotificationsHandlerTest {
assertTrue((sanitized ?: "").all { it == 'x' })
}
@Test
fun notificationsActionClearablePolicy_onlyRequiresClearableForDismiss() {
assertTrue(actionRequiresClearableNotification(NotificationActionKind.Dismiss))
assertFalse(actionRequiresClearableNotification(NotificationActionKind.Open))
assertFalse(actionRequiresClearableNotification(NotificationActionKind.Reply))
}
private fun parsePayload(result: GatewaySession.InvokeResult): JsonObject {
val payloadJson = result.payloadJson ?: error("expected payload")
return Json.parseToJsonElement(payloadJson).jsonObject