Private
Public Access
1
0

Strip space before sending messages

This commit is contained in:
2025-06-13 17:14:23 -07:00
parent 741932c67d
commit 9c013c3702

View File

@@ -57,6 +57,14 @@ public class MainWindow : Adw.ApplicationWindow
var body = view.message_body; var body = view.message_body;
var attachment_guids = view.attachment_guids; 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) { if (transcript_container_view.transcript_view.model == null) {
GLib.warning("No conversation selected"); GLib.warning("No conversation selected");
return; return;