[FIX] website_forum: modify notification message

Before Commit:
Currently, when a user marks their answer as the best answer in the forum, an
error notification appears with the message 'Sorry, you cannot vote for your own
posts' However, this error message lacks clarity and does not clarify
the underlying issue.

After Commit:
Now the error message is modified to 'Sorry,
you cannot select your own posts as the best answer'

Task-3481264

closes odoo/odoo#135193

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
This commit is contained in:
Vivek Pathak
2023-09-13 06:01:14 +00:00
parent 4e79a9ec0b
commit e1a9f3f23e
@@ -470,7 +470,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({
const message = data.error === 'anonymous_user'
? _t('Sorry, anonymous users cannot choose correct answers.')
: data.error === 'own_post'
? _t('Sorry, you cannot vote for your own posts')
? _t('Sorry, you cannot select your own posts as best answer')
: data.error;
this._displayAccessDeniedNotification(message);
return;