summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/follower
diff options
context:
space:
mode:
authorDidier (did) <did@odoo.com>2020-09-15 13:46:44 +0000
committerDidier (did) <did@odoo.com>2020-09-16 10:14:06 +0000
commitd13e451bccd122bbf9738de01563e97df831808a (patch)
treed7c308f34fe250256fdac5209976623ab9594cb1 /addons/mail/static/src/models/follower
parent5879f7dede16c8ba574ed648e4c91ca438eb93fa (diff)
[FIX] mail: send the correct args to the message_unsubscribe method
Before this commit it was not possible to remove a channel from the followers. task-2324263 closes odoo/odoo#57812 X-original-commit: 9a065048bbdd09072084d03e67fd012766ddbe23 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/follower')
-rw-r--r--addons/mail/static/src/models/follower/follower.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/mail/static/src/models/follower/follower.js b/addons/mail/static/src/models/follower/follower.js
index 6fb83649e2e..6bc6c7f579f 100644
--- a/addons/mail/static/src/models/follower/follower.js
+++ b/addons/mail/static/src/models/follower/follower.js
@@ -77,16 +77,17 @@ function factory(dependencies) {
* Remove this follower from its related thread.
*/
async remove() {
- const args = [[this.followedThread.id]];
+ const partner_ids = [];
+ const channel_ids = [];
if (this.partner) {
- args.push([this.partner.id]);
+ partner_ids.push(this.partner.id);
} else {
- args.push([this.channel.id]);
+ channel_ids.push(this.channel.id);
}
await this.async(() => this.env.services.rpc({
model: this.followedThread.model,
method: 'message_unsubscribe',
- args
+ args: [[this.followedThread.id], partner_ids, channel_ids]
}));
this.delete();
}