Continued:

- merged 2 if() into one with &&
- added TODO for possible rewrite (avoid "complex" code)

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-05-13 16:58:40 +02:00
parent bacb7b70f6
commit debcdea82a
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -391,10 +391,9 @@ function visible_activity($item) {
} }
} }
if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) { /// @TODO such things are unneccessary code-complexibilities and should be avoided
if (!(x($item, 'self') && ($item['uid'] == local_user()))) { if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && !(x($item, 'self') && ($item['uid'] == local_user()))) {
return false; return false;
}
} }
return true; return true;