From 4aa003f43fb18184de25d85e21c6146e51ac3e80 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 08:41:33 -0500 Subject: [PATCH] Use constant instead of hardcoded string for ACTIVITY_POST --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 31ab4eadec..2e6da4ce90 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1459,7 +1459,7 @@ function smart_flatten_conversation(array $parent) if (isset($child['children']) && count($child['children'])) { // This helps counting only the regular posts $count_post_closure = function($var) { - return $var['verb'] === 'http://activitystrea.ms/schema/1.0/post'; + return $var['verb'] === ACTIVITY_POST; }; $child_post_count = count(array_filter($child['children'], $count_post_closure)); @@ -1471,7 +1471,7 @@ function smart_flatten_conversation(array $parent) // Searches the post item in the children $j = 0; - while($child['children'][$j]['verb'] !== 'http://activitystrea.ms/schema/1.0/post' && $j < count($child['children'])) { + while($child['children'][$j]['verb'] !== ACTIVITY_POST && $j < count($child['children'])) { $j ++; }