android: add notifications foundation with fcm channels and deep links
Some checks failed
CI / test (push) Failing after 2m10s

This commit is contained in:
Codex
2026-03-09 14:44:28 +03:00
parent d09300311f
commit e8574252ca
14 changed files with 307 additions and 9 deletions

View File

@@ -0,0 +1,31 @@
package ru.daemonlord.messenger.push
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
class PushPayloadParserTest {
@Test
fun parse_readsChatPayloadFromDataMap() {
val payload = PushPayloadParser.parseData(
data = mapOf(
"chat_id" to "42",
"message_id" to "99",
"title" to "Alice",
"body" to "Hello",
"is_mention" to "true",
),
notificationTitle = null,
notificationBody = null,
)
assertNotNull(payload)
assertEquals(42L, payload?.chatId)
assertEquals(99L, payload?.messageId)
assertEquals("Alice", payload?.title)
assertEquals("Hello", payload?.body)
assertTrue(payload?.isMention == true)
}
}