Commit 2dd21b48d1a817b281224865b6afbbdebe48dafd

Authored by OpenWapp Developer
1 parent 0a18f56785

Now trimming message and checking it is not empty.

Showing 1 changed file with 3 additions and 1 deletions

app/scripts/views/compose-message.js View file @ 2dd21b4
... ... @@ -56,10 +56,12 @@
56 56 this._hideEmojiList();
57 57  
58 58 var html = this.$messageComposer.html().trim();
59   - if (html.length === 0) { return; }
60 59  
61 60 html = this._emojiToUnicode(html);
62 61 var text = this._brToBreakLines(html);
  62 + text = text.trim();
  63 + if (text.length === 0) { return; }
  64 +
63 65 var newModel = new Message({
64 66 type: 'text',
65 67 contents: text,