Repository navigation
feat(audio-client): accept a client request in connect - #8497
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: NONE
FindingsNo concrete security, correctness, or reliability findings were identified. Notes
Generated by Codex Security Review | |
Widen connect's URL parameter to any IntoClientRequest so hosts can attach upgrade headers, such as a NIP-FI assertion, to the audio WebSocket. Existing &str and &String callers compile unchanged. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
23a4d5c to
d66383d
Compare
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 LGTM. Bound matches connect_async_tls_with_config; existing &String caller compiles unchanged; header test proves upgrade headers reach the server. cargo test -p buzz-audio-client and clippy -D warnings pass at d66383d.
Bumps buzz-audio-client to block/buzz#8497's merge so the upgrade can carry a request; the assertion is issued for the community origin and the call runs inside during_authorization, so a retirement mid-connect cancels it. Co-authored-by: Will Pfleger <wpfleger@block.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
* origin/main: feat(audio-client): accept a client request in connect (block#8497) fix(mobile): lazily lay out new-DM recipients (block#8435) fix(mobile): lazily lay out channel member groups (block#8437) perf(mobile): retain preference crypto across reconnects (block#8442) fix(deps): bump webpki crates for RUSTSEC-2026-0381/0382/0383 (block#8499) fix(mobile): simplify and refine the quick actions menu (block#8491) fix(sdk): reject malformed mention pubkeys before signing p tags (block#6372) fix(mobile): resolve DM display labels once per sort (block#8488) docs(db): database target architecture and schema-change rules (block#8273) fix(mobile): restore channel icons and align chat colors with desktop (block#8478) test(desktop): read only the open effort menu in effort-picker e2e (block#8476) fix(relay): advance the partition catch-all by default (block#8464) feat(relay): write the NIP-43 member list in the membership transaction (block#8482) fix(relay): delete the startup NIP-33 d_tag backfill (block#8468) fix(mobile): restore Solo chats from channel labels (block#8466) fix(relay): show only legacy channel types to reads that name no channel (block#8469) fix(relay): take NIP-43 snapshot reconcile off the startup path (block#8467) test(buzz-db): fix two PostgreSQL-lane timing flakes (block#8472) Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
* feat/media-shares: feat(audio-client): accept a client request in connect (block#8497) fix(mobile): lazily lay out new-DM recipients (block#8435) fix(mobile): lazily lay out channel member groups (block#8437) perf(mobile): retain preference crypto across reconnects (block#8442) fix(deps): bump webpki crates for RUSTSEC-2026-0381/0382/0383 (block#8499) fix(mobile): simplify and refine the quick actions menu (block#8491) fix(sdk): reject malformed mention pubkeys before signing p tags (block#6372) fix(mobile): resolve DM display labels once per sort (block#8488) docs(db): database target architecture and schema-change rules (block#8273) fix(mobile): restore channel icons and align chat colors with desktop (block#8478) test(desktop): read only the open effort menu in effort-picker e2e (block#8476) fix(relay): advance the partition catch-all by default (block#8464) feat(relay): write the NIP-43 member list in the membership transaction (block#8482) fix(relay): delete the startup NIP-33 d_tag backfill (block#8468) fix(mobile): restore Solo chats from channel labels (block#8466) fix(relay): show only legacy channel types to reads that name no channel (block#8469) fix(relay): take NIP-43 snapshot reconcile off the startup path (block#8467) Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
Summary
Related: block/buzz-app#1424 (native federated sessions; attaches the assertion on Huddle audio once this lands)
buzz_audio_client::connection::connecttook the audio URL as&str, so a host had no way to add headers to the WebSocket upgrade. buzz-app needs to send its NIP-FI user assertion (Nostr-Federated-Identity: Bearer <jwt>) on the Huddle audio socket. The relay checks NIP-FI when the audio connection upgrades (audio/handler.rs→check_nip_fi_at_upgrade).This PR widens the parameter to
impl IntoClientRequest + Unpin, the same boundconnect_async_tls_with_configalready takes. Nothing else changes: TLS, timeouts and the NIP-42 handshake work as before. Existing&str/&Stringcallers, includingdesktop/src-tauri/src/huddle/relay_api.rs, compile unchanged.