Strip space before sending messages
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user