[FIX] mail: fixed replying to the first message in Inbox that was crashing

lp bug: https://launchpad.net/bugs/1212109 fixed

bzr revid: tde@openerp.com-20131125155349-4wfvjxuffnxyumkd
This commit is contained in:
Thibault Delavallée 2013-11-25 16:53:49 +01:00
parent fd080fb745
commit 6bfcee2cb7
1 changed files with 3 additions and 1 deletions

View File

@ -827,7 +827,9 @@ openerp.mail = function (session) {
// go to the parented message
var message = this.parent_thread.parent_message;
var parent_message = message.parent_id ? message.parent_thread.parent_message : message;
var messages = [parent_message].concat(parent_message.get_childs());
if(parent_message){
var messages = [parent_message].concat(parent_message.get_childs());
}
} else if (this.options.emails_from_on_composer) {
// get all wall messages if is not a mail.Wall
_.each(this.options.root_thread.messages, function (msg) {messages.push(msg); messages.concat(msg.get_childs());});