diff --git a/src/ops.rs b/src/ops.rs index 8d3444f..103bce0 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -716,7 +716,14 @@ pub fn send( .collect(); let draft = client::SendDraft { address: &addr, - text: body.to_string(), + // Trimmed at the send site, before the payload is signed, so the + // signature covers exactly the text the author meant. A compose buffer + // ends with whatever the author last pressed, and a trailing newline + // is not content — but it is content once it has been signed, and + // nothing downstream can remove it without invalidating the + // signature. smolboid, for one, refuses a post whose text carries a + // line break, because a published record is one line of a feed. + text: body.trim().to_string(), subject, reply_to, headers: &owned,