Skip to content
Snippets Groups Projects
Unverified Commit 5dd82c29 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix rendering of original sender in reply body

parent 972bc996
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,20 @@ define(function(require) {
replyComposer: '#reply-composer',
attachments: '.mail-message-attachments'
},
/**
* @private
* @param {type} email
* @returns {undefined}
*/
_formatAddress: function(address) {
if (address.label === address.email) {
return address.email;
}
return '"' + address.label + '" <' + address.email + '>';
},
initialize: function(options) {
this.account = options.account;
this.folder = options.folder;
......@@ -52,7 +66,7 @@ define(function(require) {
var text = HtmlHelper.htmlToText(this.messageBody.get('body'));
this.reply.body = '\n\n\n\n' +
this.messageBody.get('from') + '' +
this._formatAddress(this.messageBody.get('from')[0]) + '' +
$.datepicker.formatDate('D, d. MM yy ', date) +
date.getHours() + ':' + (minutes < 10 ? '0' : '') + minutes + '\n> ' +
text.replace(/\n/g, '\n> ');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment