[FIX] mail: make default mode for channel 'groups', not 'public'

It's currently confusing: the default value is already 'groups', but the create
method is actually giving another default.

task-2749643

closes odoo/odoo#86075

X-original-commit: 31dfc797bc0fb163b6e32d3fe2195791b674f00c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2022-03-09 01:45:00 +00:00
parent 5dfcdb74e5
commit 894a5a6c68
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1065,7 +1065,7 @@ class Channel(models.Model):
self.add_members(self.env.user.partner_id.ids)
@api.model
def channel_create(self, name, privacy='public'):
def channel_create(self, name, privacy='groups'):
""" Create a channel and add the current partner, broadcast it (to make the user directly
listen to it when polling)
:param name : the name of the channel to create
@@ -40,7 +40,7 @@ registerModel({
const channel = await this.async(() =>
this.messaging.models['Thread'].performRpcCreateChannel({
name,
privacy: ui.item.special,
privacy: ui.item.special === 'private' ? 'private' : 'groups',
})
);
channel.open();