From 4ba87e073def4b4af4a5fe72d9121cde90ad7a71 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 28 Aug 2018 14:26:09 +0200 Subject: [PATCH] [FIX] mail: right user_ids when calling /mail/follow On a SO, write a note to a user The mail the user receives contains a follow button Click on it Before this commit, the link did not add the user as follower of the SO this was because the wrong uid was passed to the function After this commit, user is added as follower OPW 1869849 closes #26634 --- addons/mail/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index f2568685da0..e2c673ba5b7 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -194,7 +194,7 @@ class MailController(http.Controller): comparison, record, redirect = self._check_token_and_record_or_redirect(model, int(res_id), token) if comparison and record: try: - record.sudo().message_subscribe_users() + record.sudo().message_subscribe_users(user_ids=[request.uid]) except Exception: return self._redirect_to_messaging() return redirect