mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:00:16 +00:00
Merge pull request #4511 from annando/no-activity
Only show visible activities
This commit is contained in:
commit
4fe1d804ab
1 changed files with 21 additions and 17 deletions
|
@ -397,7 +397,7 @@ function visible_activity($item) {
|
|||
}
|
||||
|
||||
if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) {
|
||||
if (! (($item['self']) && ($item['uid'] == local_user()))) {
|
||||
if (!($item['self'] && ($item['uid'] == local_user()))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -636,6 +636,10 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order =
|
|||
|
||||
foreach ($items as $item) {
|
||||
|
||||
if (!visible_activity($item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($arr_blocked) {
|
||||
$blocked = false;
|
||||
foreach ($arr_blocked as $b) {
|
||||
|
@ -661,8 +665,8 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order =
|
|||
continue;
|
||||
}
|
||||
|
||||
$profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
|
||||
if ($item['author-link'] && (! $item['author-name'])) {
|
||||
$profile_name = (strlen($item['author-name']) ? $item['author-name'] : $item['name']);
|
||||
if ($item['author-link'] && !$item['author-name']) {
|
||||
$profile_name = $item['author-link'];
|
||||
}
|
||||
|
||||
|
@ -1013,7 +1017,7 @@ function item_photo_menu($item) {
|
|||
$photos_link = '';
|
||||
$posts_link = '';
|
||||
|
||||
if ((local_user()) && local_user() == $item['uid'] && $item['parent'] == $item['id'] && (! $item['self'])) {
|
||||
if (local_user() && local_user() == $item['uid'] && $item['parent'] == $item['id'] && !$item['self']) {
|
||||
$sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
|
||||
}
|
||||
|
||||
|
@ -1126,9 +1130,9 @@ function builtin_activity_puller($item, &$conv_responses) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
|
||||
if (activity_match($item['verb'], $verb) && ($item['id'] != $item['parent'])) {
|
||||
$url = $item['author-link'];
|
||||
if ((local_user()) && (local_user() == $item['uid']) && ($item['network'] === NETWORK_DFRN) && (! $item['self']) && (link_compare($item['author-link'], $item['url']))) {
|
||||
if (local_user() && (local_user() == $item['uid']) && ($item['network'] === NETWORK_DFRN) && !$item['self'] && link_compare($item['author-link'], $item['url'])) {
|
||||
$url = 'redir/' . $item['contact-id'];
|
||||
$sparkle = ' class="sparkle" ';
|
||||
} else {
|
||||
|
@ -1141,8 +1145,8 @@ function builtin_activity_puller($item, &$conv_responses) {
|
|||
$item['thr-parent'] = $item['parent-uri'];
|
||||
}
|
||||
|
||||
if (! ((isset($conv_responses[$mode][$item['thr-parent'] . '-l']))
|
||||
&& (is_array($conv_responses[$mode][$item['thr-parent'] . '-l'])))) {
|
||||
if (!(isset($conv_responses[$mode][$item['thr-parent'] . '-l'])
|
||||
&& is_array($conv_responses[$mode][$item['thr-parent'] . '-l']))) {
|
||||
$conv_responses[$mode][$item['thr-parent'] . '-l'] = [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue