Commit ecaf50902d0937da18cb4f185048b48362712152
Merge branch 'issue-149-trimming-message' of /home/git/repositories/openwapp/openwapp
Showing 1 changed file
app/scripts/views/compose-message.js
View file @
ecaf509
... | ... | @@ -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, |