[FIX] mail: open a channel in discuss on systray click
User B mentions @UserA in a channel on discuss User A gets two notifications: one for direct chat,the other for the channel User A clicks on the notification for the channel Before this commit the form view of the channel was opened After this commit, the channel is opened in discuss OPW 1849577 closes #25074
This commit is contained in:
@@ -122,7 +122,7 @@ var MessagingMenu = Widget.extend({
|
||||
if (channelID === 'channel_inbox') {
|
||||
var resID = $(event.currentTarget).data('res_id');
|
||||
var resModel = $(event.currentTarget).data('res_model');
|
||||
if (resModel && resID) {
|
||||
if (resModel && resModel !== 'mail.channel' && resID) {
|
||||
this.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: resModel,
|
||||
@@ -130,7 +130,11 @@ var MessagingMenu = Widget.extend({
|
||||
res_id: resID
|
||||
});
|
||||
} else {
|
||||
this.do_action('mail.mail_channel_action_client_chat', {clear_breadcrumbs: true})
|
||||
var clientChatOptions = {clear_breadcrumbs: true};
|
||||
if (resModel && resModel === 'mail.channel' && resID) {
|
||||
clientChatOptions.active_id = resID;
|
||||
}
|
||||
this.do_action('mail.mail_channel_action_client_chat', clientChatOptions)
|
||||
.then(function () {
|
||||
self.trigger_up('hide_app_switcher');
|
||||
core.bus.trigger('change_menu_section', chat_manager.get_discuss_menu_id());
|
||||
|
||||
Reference in New Issue
Block a user