|
|
@ -16,6 +16,30 @@ ChatAction.include({ |
|
|
|
subject = "Re: " + message.subject; |
|
|
|
} |
|
|
|
this.extended_composer.set_subject(subject); |
|
|
|
}, |
|
|
|
on_post_message: function(message){ |
|
|
|
var self = this; |
|
|
|
var options = this.selected_message ? {} : {channel_id: this.channel.id}; |
|
|
|
if (this.selected_message) { |
|
|
|
message.subtype = 'mail.mt_comment'; |
|
|
|
message.subtype_id = false; |
|
|
|
message.message_type = 'comment'; |
|
|
|
message.content_subtype = 'html'; |
|
|
|
|
|
|
|
options.model = this.selected_message.model; |
|
|
|
options.res_id = this.selected_message.res_id; |
|
|
|
options.parent_id = this.selected_message.id; |
|
|
|
} |
|
|
|
base_obj.chat_manager |
|
|
|
.post_message(message, options) |
|
|
|
.then(function() { |
|
|
|
if (self.selected_message) { |
|
|
|
self.render_snackbar('mail.chat.MessageSentSnackbar', {record_name: self.selected_message.record_name}, 5000); |
|
|
|
self.unselect_message(); |
|
|
|
} else { |
|
|
|
self.thread.scroll_to(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|