Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

fix(core): a message attachment too large to send isn't reported as busy

Bee5b3cf6036ccf
diff --git a/core/nectarlink-core/src/sms.rs b/core/nectarlink-core/src/sms.rs
index ecdfa62..fc501b3 100644
--- a/core/nectarlink-core/src/sms.rs
+++ b/core/nectarlink-core/src/sms.rs
@@ -183,7 +183,7 @@ async fn answer(shared: &Arc<Shared>, session: &Session, env: &Envelope) -> Resu
blocking(Box::new(move || {
let (mime, data) = platform.sms_part(&id)?;
if data.len() > sms::MAX_PART_BYTES {
- return Ok(Envelope::error(ErrorCode::Busy, "too large"));
+ return Ok(Envelope::error(ErrorCode::FrameTooLarge, "too large"));
}
Envelope::new(types::SMS_PART, &SmsPartData { mime, data }).map_err(|e| e.to_string())
}))