summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-04-25 14:43:44 +0200
committerChristophe Simonis <chs@odoo.com>2016-04-25 14:43:44 +0200
commitbb8f0f1fc3d0f5574938019ca69cc917a55e7962 (patch)
treea6662094bb9c307981461fdb9872195032f2da06 /addons/mail/static/src
parent9ad6a9df6e5e5654bc98c4c655848404b4e946b2 (diff)
parent4d337f72ed59d1e5260fa2bb4f3d238e6ed11415 (diff)
[MERGE] forward port of branch saas-9 up to 4d337f7
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/chat_manager.js6
-rw-r--r--addons/mail/static/src/js/chatter.js2
2 files changed, 3 insertions, 5 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js
index 80c758bc335..ab9f88826dd 100644
--- a/addons/mail/static/src/js/chat_manager.js
+++ b/addons/mail/static/src/js/chat_manager.js
@@ -260,10 +260,8 @@ function make_channel (data, options) {
messages: [],
}},
};
- if (channel.type === "channel" && data.public !== "private") {
- channel.type = "public";
- } else if (data.public === "private") {
- channel.type = "private";
+ if (channel.type === "channel") {
+ channel.type = data.public !== "private" ? "public" : "private";
}
if (_.size(data.direct_partner) > 0) {
channel.type = "dm";
diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js
index 431119baefd..0de5e348098 100644
--- a/addons/mail/static/src/js/chatter.js
+++ b/addons/mail/static/src/js/chatter.js
@@ -511,7 +511,7 @@ var Chatter = form_common.AbstractField.extend({
this.mute_new_message_button(true);
},
close_composer: function (force) {
- if (this.composer.is_empty() || force) {
+ if (this.composer && (this.composer.is_empty() || force)) {
this.composer.do_hide();
this.composer.$input.val('');
this.mute_new_message_button(false);