fix(qa): attempt to fix akismet error

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz 2023-03-08 20:14:09 +01:00
parent 72d277bd45
commit eaa4063fef
No known key found for this signature in database

View File

@ -4,7 +4,7 @@ import type Post from 'flarum/common/models/Post';
import type ItemList from 'flarum/common/utils/ItemList';
import PostControls from 'flarum/forum/utils/PostControls';
import CommentPost from 'flarum/forum/components/CommentPost';
import PostComponent from 'flarum/forum/components/Post';
import type Mithril from 'mithril';
app.initializers.add('flarum-akismet', () => {
@ -21,7 +21,7 @@ app.initializers.add('flarum-akismet', () => {
}
});
override(CommentPost.prototype, 'flagReason', function (original, flag) {
override(PostComponent.prototype, 'flagReason', function (original, flag) {
if (flag.type() === 'akismet') {
return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');
}