From a1c079bbf1c898fc8bc2778740d6504d75736e21 Mon Sep 17 00:00:00 2001 From: "Didier (did)" Date: Mon, 31 Jul 2023 10:00:34 +0000 Subject: [PATCH] [FIX] mail: fix nextMentionRpcFunction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this PR, the `nextMentionRpcFunction` was always undefined and therefor never used. This could lead to some RPC being lost if the previous one was too slow. This PR fix the issue by directly using the `rpcFunction` that is already assigned. closes odoo/odoo#130292 X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/core/common/suggestion_hook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/core/common/suggestion_hook.js b/addons/mail/static/src/core/common/suggestion_hook.js index 59c3ee5342c..8ba27fc18f3 100644 --- a/addons/mail/static/src/core/common/suggestion_hook.js +++ b/addons/mail/static/src/core/common/suggestion_hook.js @@ -112,8 +112,8 @@ export function useSuggestion() { self.fetch.rpcFunction = undefined; await func(); self.fetch.inProgress = false; - if (self.fetch.nextMentionRpcFunction) { - self.process(self.fetch.nextMentionRpcFunction); + if (self.fetch.rpcFunction) { + self.process(self.fetch.rpcFunction); } }, search: {