Merge branch 'dev' of codeberg.org:streams/streams into dev

This commit is contained in:
Mike Macgirvin 2024-07-19 17:14:35 +10:00
commit de8d7d042e
2 changed files with 6 additions and 6 deletions

View file

@ -43,7 +43,7 @@ class Cover_photo extends Controller
return;
}
$this->$channel = App::get_channel();
$this->channel = Channel::from_id(local_channel());
Libprofile::load($this->channel['channel_address']);
}
@ -202,7 +202,7 @@ class Cover_photo extends Controller
return;
}
$this->send_cover_photo_activity($this->channel, $base_image, $profile);
$this->send_cover_photo_activity($base_image, $profile);
// put the url and a copy in the places we look for remote cover photos.
XConfig::Set($this->channel['channel_hash'], 'system', 'cover_photo', Channel::getDidResolver($this->channel) . '/photo/' . $base_image['resource_id'] . '-7');
Stdio::fcopy('store/' . $this->channel['channel_address'] . '/' . $p['os_path'] . '-9', Hashpath::path($this->channel['channel_hash'], 'cache/xp' , 2) . '-9');

View file

@ -114,8 +114,8 @@ class Display extends Controller
$item_hash = unpack_link_id($item_hash);
$r = q(
"select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
"select * from item where mid = '%s' limit 1",
dbesc($item_hash)
);
if ($r) {
@ -220,11 +220,11 @@ class Display extends Controller
// if the target item is not a post (eg a like) we want to address its thread parent
$mid = ((($target_item['verb'] == ACTIVITY_LIKE) || ($target_item['verb'] == ACTIVITY_DISLIKE)) ? $target_item['thr_parent'] : $target_item['mid']);
// $mid = ((($target_item['verb'] == ACTIVITY_LIKE) || ($target_item['verb'] == ACTIVITY_DISLIKE)) ? $target_item['thr_parent'] : $target_item['mid']);
// if we received a decoded hash originally we must encode it again before handing to javascript
$mid = gen_link_id($mid);
$mid = gen_link_id($target_item['mid']);
$max_height = local_channel() ? get_pconfig(local_channel(), 'system', 'stream_divmore_height', 400) : 400;
$item_scroll = get_pconfig(local_channel(), 'system', 'item_scroll');