auto inline embed ostatus image attachments

This commit is contained in:
zotlabs 2017-06-09 15:24:37 -07:00
parent 2a21285037
commit 42c9f853a7
2 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,7 @@ class Connections extends \Zotlabs\Web\Controller {
),
'archived' => array(
'label' => t('Archived'),
'label' => t('Archived/Unreachable'),
'url' => z_root() . '/connections/archived',
'sel' => ($archived) ? 'active' : '',
'title' => t('Only show archived/unreachable connections'),

View File

@ -613,6 +613,10 @@ function get_atom_elements($feed, $item, &$author) {
if(! $type)
$type = 'application/octet-stream';
if(($ostatus_protocol) && (strpos($type,'image') === 0) && (strpos($res['body'],$link) === false) && (strpos($link,'http') === 0)) {
$res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
}
$res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title );
}
}