diff --git a/src/application/main-window.vala b/src/application/main-window.vala index 499f30e..4d70318 100644 --- a/src/application/main-window.vala +++ b/src/application/main-window.vala @@ -57,6 +57,14 @@ public class MainWindow : Adw.ApplicationWindow var body = view.message_body; var attachment_guids = view.attachment_guids; + // Strip empty space at the beginning and end of the body + body = body.strip(); + + if (body.length == 0) { + GLib.warning("Message body is empty"); + return; + } + if (transcript_container_view.transcript_view.model == null) { GLib.warning("No conversation selected"); return;