feat: switch NIP-AC from GiftWrap with expiration to EphemeralGiftWrap
Use EphemeralGiftWrapEvent (kind 21059) instead of GiftWrapEvent (kind 1059) for WebRTC call signaling. The ephemeral kind signals to relays that these events are transient and should not be persisted, eliminating the need for expiration tags on both inner signaling events and outer wraps. Changes: - Remove expiration tags from all 6 call event types (25050-25055) - Switch WebRtcCallFactory to produce EphemeralGiftWrapEvent wraps - Update CallManager and CallController publishEvent types - Update Account.publishCallSignaling signature - Use CallManager.MAX_EVENT_AGE_SECONDS for staleness checks - Update NIP-AC spec to document EphemeralGiftWrap usage - Remove expiration-related tests https://claude.ai/code/session_014kyBgZx7cNyeUXYWV25M4j
This commit is contained in:
+2
-2
@@ -23,7 +23,7 @@ package com.vitorpamplona.amethyst.commons.call
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner
|
||||
import com.vitorpamplona.quartz.nip59Giftwrap.wraps.GiftWrapEvent
|
||||
import com.vitorpamplona.quartz.nip59Giftwrap.wraps.EphemeralGiftWrapEvent
|
||||
import com.vitorpamplona.quartz.nipACWebRtcCalls.WebRtcCallFactory
|
||||
import com.vitorpamplona.quartz.nipACWebRtcCalls.events.CallAnswerEvent
|
||||
import com.vitorpamplona.quartz.nipACWebRtcCalls.events.CallHangupEvent
|
||||
@@ -46,7 +46,7 @@ class CallManager(
|
||||
private val signer: NostrSigner,
|
||||
private val scope: CoroutineScope,
|
||||
private val isFollowing: (HexKey) -> Boolean,
|
||||
private val publishEvent: (GiftWrapEvent) -> Unit,
|
||||
private val publishEvent: (EphemeralGiftWrapEvent) -> Unit,
|
||||
) {
|
||||
private val factory = WebRtcCallFactory()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user