diff --git a/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js b/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js index 894a1b2cef5..cf6fcf24953 100644 --- a/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js +++ b/addons/mail/static/src/components/follower_list_menu/follower_list_menu_tests.js @@ -365,7 +365,7 @@ QUnit.test('click on remove follower', async function (assert) { assert.step('message_unsubscribe'); assert.deepEqual( args.args, - [[100], [self.env.messaging.currentPartner.id]], + [[100], [self.env.messaging.currentPartner.id], []], "message_unsubscribe should be called with right argument" ); } 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(); }