diff --git a/addons/mail/static/src/components/activity/activity.js b/addons/mail/static/src/components/activity/activity.js
index 78cda729210..3f701d1f4f6 100644
--- a/addons/mail/static/src/components/activity/activity.js
+++ b/addons/mail/static/src/components/activity/activity.js
@@ -123,7 +123,7 @@ export class Activity extends Component {
ev.target.dataset.oeId &&
ev.target.dataset.oeModel
) {
- this.env.messaging.openProfile({
+ this.activity.messaging.openProfile({
id: Number(ev.target.dataset.oeId),
model: ev.target.dataset.oeModel,
});
diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml
index 5ae37236191..0a1c4b3fae3 100644
--- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml
+++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml
@@ -26,8 +26,8 @@
@@ -47,7 +47,7 @@
-
+
@@ -56,7 +56,7 @@
-
diff --git a/addons/mail/static/src/components/channel_invitation_form/channel_invitation_form.xml b/addons/mail/static/src/components/channel_invitation_form/channel_invitation_form.xml
index 1b331ad698f..eb1e12b7dd5 100644
--- a/addons/mail/static/src/components/channel_invitation_form/channel_invitation_form.xml
+++ b/addons/mail/static/src/components/channel_invitation_form/channel_invitation_form.xml
@@ -16,7 +16,7 @@
diff --git a/addons/mail/static/src/components/chat_window/chat_window.js b/addons/mail/static/src/components/chat_window/chat_window.js
index ff4863f6505..7f56e0e34f4 100644
--- a/addons/mail/static/src/components/chat_window/chat_window.js
+++ b/addons/mail/static/src/components/chat_window/chat_window.js
@@ -75,7 +75,7 @@ export class ChatWindow extends Component {
* @private
*/
_applyVisibleOffset() {
- const textDirection = this.env.messaging.locale.textDirection;
+ const textDirection = this.chatWindow.messaging.locale.textDirection;
const offsetFrom = textDirection === 'rtl' ? 'left' : 'right';
const oppositeFrom = offsetFrom === 'right' ? 'left' : 'right';
this.el.style[offsetFrom] = this.chatWindow.visibleOffset + 'px';
@@ -161,11 +161,11 @@ export class ChatWindow extends Component {
* @param {integer} ui.item.id
*/
async _onAutocompleteSelect(ev, ui) {
- const chat = await this.env.messaging.getChat({ partnerId: ui.item.id });
+ const chat = await this.chatWindow.messaging.getChat({ partnerId: ui.item.id });
if (!chat) {
return;
}
- this.env.messaging.chatWindowManager.openThread(chat, {
+ this.chatWindow.messaging.chatWindowManager.openThread(chat, {
makeActive: true,
replaceNewMessage: true,
});
@@ -206,7 +206,7 @@ export class ChatWindow extends Component {
*/
_onClickedHeader(ev) {
ev.stopPropagation();
- if (this.env.messaging.device.isMobile) {
+ if (this.chatWindow.messaging.device.isMobile) {
return;
}
if (this.chatWindow.isFolded) {
diff --git a/addons/mail/static/src/components/chat_window/chat_window.xml b/addons/mail/static/src/components/chat_window/chat_window.xml
index 52db36a7090..71d5d776f13 100644
--- a/addons/mail/static/src/components/chat_window/chat_window.xml
+++ b/addons/mail/static/src/components/chat_window/chat_window.xml
@@ -7,7 +7,7 @@
'o-focused': chatWindow and chatWindow.isFocused,
'o-folded': chatWindow and chatWindow.isFolded,
'o-fullscreen': props.isFullscreen,
- 'o-mobile': env.messaging.device.isMobile,
+ 'o-mobile': chatWindow and chatWindow.messaging.device.isMobile,
'o-new-message': chatWindow and !chatWindow.thread,
}" t-on-keydown="_onKeydown" t-on-focusout="_onFocusout" t-att-data-chat-window-local-id="chatWindow ? chatWindow.localId : undefined" t-att-data-thread-local-id="chatWindow ? (chatWindow.thread ? chatWindow.thread.localId : '') : undefined"
>
@@ -26,7 +26,7 @@
composerAttachmentsDetailsMode="'card'"
hasComposer="chatWindow.thread.model !== 'mail.box'"
hasComposerCurrentPartnerAvatar="false"
- hasComposerSendButton="env.messaging.device.isMobile"
+ hasComposerSendButton="chatWindow.messaging.device.isMobile"
hasSquashCloseMessages="chatWindow.thread.model !== 'mail.box'"
threadViewLocalId="chatWindow.threadView.localId"
t-on-focusin="_onFocusinThread"
diff --git a/addons/mail/static/src/components/chat_window_header/chat_window_header.js b/addons/mail/static/src/components/chat_window_header/chat_window_header.js
index fbe06bd7213..49ce57afeb9 100644
--- a/addons/mail/static/src/components/chat_window_header/chat_window_header.js
+++ b/addons/mail/static/src/components/chat_window_header/chat_window_header.js
@@ -25,7 +25,7 @@ export class ChatWindowHeader extends Component {
* @returns {string}
*/
get shiftNextText() {
- if (this.env.messaging.locale.textDirection === 'rtl') {
+ if (this.chatWindow.messaging.locale.textDirection === 'rtl') {
return this.env._t("Shift left");
}
return this.env._t("Shift right");
@@ -35,7 +35,7 @@ export class ChatWindowHeader extends Component {
* @returns {string}
*/
get shiftPrevText() {
- if (this.env.messaging.locale.textDirection === 'rtl') {
+ if (this.chatWindow.messaging.locale.textDirection === 'rtl') {
return this.env._t("Shift right");
}
return this.env._t("Shift left");
diff --git a/addons/mail/static/src/components/chat_window_header/chat_window_header.xml b/addons/mail/static/src/components/chat_window_header/chat_window_header.xml
index e4fa3dcf750..628e9e0ef45 100644
--- a/addons/mail/static/src/components/chat_window_header/chat_window_header.xml
+++ b/addons/mail/static/src/components/chat_window_header/chat_window_header.xml
@@ -2,10 +2,10 @@
-