fix(serverless): log encrypted-recipient resolution on send (diagnostic)

This commit is contained in:
Michael Neale
2026-06-04 09:53:26 +10:00
parent 6c7dc2753e
commit a9b627c4b6

View File

@@ -434,7 +434,12 @@ pub async fn send_channel_message(
// (the encrypted inner event), so threading is preserved without leaking
// the reply as plaintext to the relays.
if kind_num == sprout_core::kind::KIND_STREAM_MESSAGE {
if let Some(members) = encrypted_recipients(&state, &channel_id).await? {
let recip = encrypted_recipients(&state, &channel_id).await?;
eprintln!(
"sprout-desktop: [serverless] send to {channel_id}: encrypted_recipients = {:?}",
recip.as_ref().map(|m| m.len())
);
if let Some(members) = recip {
// Build the in-rumor thread ref from caller-supplied ids (no relay
// lookup — the parent rumor isn't stored plaintext on the relay).
let thread_ref = match &parent_event_id {