From debcdea82a94afb87858f8bc859545b48f5cf7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sun, 13 May 2018 16:58:40 +0200 Subject: [PATCH] Continued: - merged 2 if() into one with && - added TODO for possible rewrite (avoid "complex" code) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- include/conversation.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index e617eebf38..e971798c95 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -391,10 +391,9 @@ function visible_activity($item) { } } - if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) { - if (!(x($item, 'self') && ($item['uid'] == local_user()))) { - return false; - } + /// @TODO such things are unneccessary code-complexibilities and should be avoided + if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && !(x($item, 'self') && ($item['uid'] == local_user()))) { + return false; } return true;