The fetch function now centrally controls the content

This commit is contained in:
Michael 2018-06-24 10:48:29 +00:00
parent 62a61a95d3
commit b03db4643f
14 changed files with 56 additions and 43 deletions

View file

@ -2078,7 +2078,7 @@ function api_statuses_mentions($type)
$start = ($page - 1) * $count;
$condition = ["`uid` = ? AND `verb` = ? AND `item`.`id` > ? AND `author-id` != ?
AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `uid` = ? AND `mention` AND NOT `ignored`)",
AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `thread`.`uid` = ? AND `thread`.`mention` AND NOT `thread`.`ignored`)",
api_user(), ACTIVITY_POST, $since_id, $user_info['pid'], api_user()];
if ($max_id > 0) {

View file

@ -562,15 +562,8 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order =
continue;
}
if ($item['network'] == NETWORK_FEED) {
$item['author-avatar'] = $item['contact-avatar'];
$item['author-name'] = $item['contact-name'];
$item['owner-avatar'] = $item['contact-avatar'];
$item['owner-name'] = $item['contact-name'];
}
$profile_name = (strlen($item['author-name']) ? $item['author-name'] : $item['name']);
if ($item['author-link'] && !$item['author-name']) {
$profile_name = $item['author-name'];
if (!empty($item['author-link']) && empty($item['author-name'])) {
$profile_name = $item['author-link'];
}