From 3356059d50157ab4d2d768e9b2e0f52be2038b9e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 15 Apr 2026 21:32:00 -0400 Subject: [PATCH] Removes warnings --- .../marmot/MarmotGroupEventsEoseManager.kt | 2 +- .../amethyst/commons/call/CallManagerTest.kt | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/marmot/MarmotGroupEventsEoseManager.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/marmot/MarmotGroupEventsEoseManager.kt index 5457125d4..4ad2b2153 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/marmot/MarmotGroupEventsEoseManager.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/marmot/MarmotGroupEventsEoseManager.kt @@ -67,7 +67,7 @@ class MarmotGroupEventsEoseManager( val groupFilters = sub.activeGroupFiltersSnapshot() // activeGroupFilters() returns one filter per group; match by tag content groupFilters.find { f -> - f.tags?.any { it.value?.contains(groupId) == true } == true + f.tags?.any { it.value.contains(groupId) } == true } } ?: continue diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt index 6ffda5ae1..b86369b87 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt @@ -1831,21 +1831,6 @@ class CallManagerTest { assertIs(manager.state.value) } - // ======================================================================== - // Multi-Device: Second Logged-In Device Must Stop Ringing - // ======================================================================== - // When the user is logged in on two phones and Alice calls them, both - // devices ring. When one picks up (or rejects), the other must stop - // ringing without disturbing the device that answered. - // - // Mechanism: acceptCall / rejectCall publish an extra gift wrap of the - // same signed answer/reject event addressed to the user's own pubkey, - // so a sibling device (subscribed to gift wraps for its own pubkey) - // observes the echo, detects a self-answer/self-reject in IncomingCall - // state and transitions to Ended(ANSWERED_ELSEWHERE / REJECTED). - - private fun EphemeralGiftWrapEvent.recipientPubKey(): HexKey? = tags.firstOrNull { it.size >= 2 && it[0] == "p" }?.get(1) - @Test fun acceptCallPublishesAnswerWrappedForSelfSoSiblingDeviceCanStopRinging() = runTest {