mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
chore: temporary diagnostic logging for public chat relay targeting
Logs the relay set targeted by the public-chat send path and the broadcast path under tag "PublicChatRelayDebug", so an on-device repro can show whether the channel-declared relay is actually in the target set. To be reverted once the declared-relay case is diagnosed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AYtHYEob2THu74inTxZxCh
This commit is contained in:
@@ -1403,7 +1403,13 @@ class Account(
|
||||
// missing signature.
|
||||
return
|
||||
} else {
|
||||
client.publish(noteEvent, computeRelayListToBroadcast(note))
|
||||
val toRelays = computeRelayListToBroadcast(note)
|
||||
// TEMP DIAGNOSTIC (public chat relay bug): what does broadcast target?
|
||||
Log.w("PublicChatRelayDebug") {
|
||||
"BROADCAST event=${noteEvent.id} kind=${noteEvent.kind} " +
|
||||
"channelRelays=${cache.getAnyChannel(noteEvent)?.relays()} -> target=$toRelays"
|
||||
}
|
||||
client.publish(noteEvent, toRelays)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -301,6 +301,12 @@ open class ChannelNewMessageViewModel :
|
||||
val template = createTemplate() ?: return
|
||||
val channelRelays = channel?.relays() ?: emptySet()
|
||||
|
||||
// TEMP DIAGNOSTIC (public chat relay bug): what relays does the send target?
|
||||
val pubChat = channel as? PublicChatChannel
|
||||
Log.w("PublicChatRelayDebug") {
|
||||
"SEND channel=${pubChat?.idHex} declared(info.relays)=${pubChat?.info?.relays} -> target=$channelRelays (empty target -> broadcast fallback)"
|
||||
}
|
||||
|
||||
val version = draftTag.current
|
||||
cancel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user