Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(dispatch): use let-else to simplify envelope extraction

Steven Enamakel8b6068cd9b54
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs
index cf6e4f3191..e33a7e6125 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs
@@ -83,9 +83,7 @@ pub(crate) async fn admit_runtime_message(
Some(prepared) => prepared,
None => {
let source = if message.channel.is_empty() {
- let Some(envelope) = inbound_envelope else {
- return None;
- };
+ let envelope = inbound_envelope?;
ChannelInboundSource::Envelope {
envelope,
timestamp: 0,