Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-06-07 14:46:29 -07:00
commit 7e7d4ae6a9
2 changed files with 8 additions and 2 deletions

View file

@ -3090,7 +3090,13 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
$bb .= "[/share]";
$arr['body'] = $bb;
// Conversational objects shouldn't be copied, but other objects should. We'll start with photos and events since those are the most likely.
if (in_array($item['obj_type'], [ 'Image', 'Event' ])) {
$arr['obj'] = $item['obj'];
}
$arr['tgt_type'] = $item['tgt_type'];
$arr['target'] = $item['target'];
$arr['term'] = $item['term'];
$arr['author_xchan'] = $channel['channel_hash'];

View file

@ -1704,7 +1704,7 @@ function prepare_body(&$item,$attach = false,$opts = false) {
$object = json_decode($item['obj'],true);
$ptr = null;
if (array_key_exists('url',$object) && is_array($object['url'])) {
if (is_array($object) && array_key_exists('url',$object) && is_array($object['url'])) {
if (array_key_exists(0,$object['url'])) {
foreach ($object['url'] as $link) {
if(array_key_exists('width',$link) && $link['width'] >= 640 && $link['width'] <= 1024) {