File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function kommentsAreExpired($page)
4646 public function getCommentList ($ page ): Structure
4747 {
4848 $ comments = $ this ->storage ->getCommentsOfPage ($ page ->uuid ());
49- $ publishedComments = $ comments ->filterBy ('published ' , true );
49+ $ publishedComments = $ comments ->filterBy ('verification_status ' , ' PUBLISHED ' );
5050
5151 return $ publishedComments ;
5252 }
Original file line number Diff line number Diff line change 1111 'queuedComments ' => function () {
1212 $ storage = StorageFactory::create ();
1313 $ comments = $ storage ->getCommentsOfSite ();
14- $ unpublishedComments = $ comments ->filterBy ('published ' , false );
14+ $ unpublishedComments = $ comments ->filterBy ('verification_status ' , ' PUBLISHED ' );
1515
1616 return $ unpublishedComments ->count ();
1717 },
Original file line number Diff line number Diff line change 66 'commentCount ' => function ($ language = null ): int {
77 $ storage = StorageFactory::create ();
88 $ comments = $ storage ->getCommentsOfPage ($ this ->uuid ());
9- $ publishedComments = $ comments ->filterBy ('published ' , true );
9+ $ publishedComments = $ comments ->filterBy ('verification_status ' , ' PUBLISHED ' );
1010
1111 if (!is_null ($ language )) {
1212 $ publishedComments = $ publishedComments ->filterBy ('language ' , $ language );
Original file line number Diff line number Diff line change 66 'numberOfPendingComments ' => function () {
77 $ storage = StorageFactory::create ();
88 $ comments = $ storage ->getCommentsOfSite ();
9- $ unpublishedComments = $ comments ->filterBy ('published ' , false );
109
11- if (!option ('mauricerenck.komments.panel.webmentions ' , false )) {
10+ $ filter = option ('mauricerenck.komments.spam.verification.filterUnverfied ' , true ) ? 'VERIFIED ' : 'PENDING ' ;
11+ $ unpublishedComments = $ comments ->filterBy ('verification_status ' , $ filter );
12+
13+ if (!option ('mauricerenck.komments.panel.webmentions ' , false )) {
1214 $ unpublishedComments = $ unpublishedComments ->filterBy ('type ' , 'comment ' );
1315 }
1416
1820 $ storage = StorageFactory::create ();
1921 $ comments = $ storage ->getCommentsOfSite ();
2022 $ spamComments = $ comments ->filter (
21- fn ($ child ) => $ child ->spamlevel ()->value () >= option ('mauricerenck.komments.spam.sensibility ' , 60 )
23+ fn ($ child ) => $ child ->spamlevel ()->value () >= option ('mauricerenck.komments.spam.sensibility ' , 60 )
2224 );
2325
2426 return $ spamComments ->count ();
You can’t perform that action at this time.
0 commit comments