mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
fix(qa): attempt to fix akismet error
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
parent
72d277bd45
commit
eaa4063fef
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user