diff --git a/README.md b/README.md index 498528c..dd3824d 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ not excluded for getting higher score than other members :) most cases turned off by administrators for various reasons, such as not following the group's code of conduct or low quality. * Offensive messages and inappropriate links can get you negative points. +* Some topics (such as administrators announcements and similar) are awarded with + extra points as a recognition for special contributions to the group. **What is the default points configuration and why such configuration for calculation?** diff --git a/app/config/points.yml b/app/config/points.yml index 41809e6..035f199 100644 --- a/app/config/points.yml +++ b/app/config/points.yml @@ -43,5 +43,5 @@ urls: - ['lmgtfy.com', -10] - ['w3schools.com', -20] -# Points for special announcements and topics from group staff -points_for_admin_topics: '(topic.getUser().getId() in admins && contains(topic.getMessage(), "[!]") ) ? 20 : ((topic.getUser().getId() in admins) ? 10 : 0)' +# Points for topics from admins +points_for_admin_topics: '(topic.getUser().getId() in admins) ? 5 : 0' diff --git a/tests/PointsTest.php b/tests/PointsTest.php index 1f3b2f9..452d96c 100644 --- a/tests/PointsTest.php +++ b/tests/PointsTest.php @@ -105,8 +105,7 @@ public function topicsProvider() 'photo_only' => ['', 11, 'photo', true, ['name' => 'User Name', 'id' => 2000], 0], 'gif' => ['', 11, 'animated_image_share', true, ['name' => 'User Name', 'id' => 2000], 0], 'closed_topic' => ['Lorem ipsum dolor sit amet', 50, 'status', false, ['name' => 'User Name', 'id' => 2000], 0], - 'admin_topic' => ['Lorem ipsum dolor sit amet', 0, 'status', true, ['name' => 'Admin User', 'id' => 1000], 11], - 'admin_announcement' => ['[!]Lorem ipsum dolor sit amet', 0, 'status', true, ['name' => 'Admin User', 'id' => 1000], 21], + 'admin_topic' => ['Lorem ipsum dolor sit amet', 0, 'status', true, ['name' => 'Admin User', 'id' => 1000], 6], ]; }