diff options
author | zotlabs <mike@macgirvin.com> | 2017-06-09 15:24:37 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-06-09 15:24:37 -0700 |
commit | 42c9f853a7d878fef7f545b58a744c134baabc02 (patch) | |
tree | 3ea96a63343962e4e2c57ae3c0024d3180a9500f | |
parent | 2a2128503735881b56ab299873a3a740ff937a3e (diff) | |
download | volse-hubzilla-42c9f853a7d878fef7f545b58a744c134baabc02.tar.gz volse-hubzilla-42c9f853a7d878fef7f545b58a744c134baabc02.tar.bz2 volse-hubzilla-42c9f853a7d878fef7f545b58a744c134baabc02.zip |
auto inline embed ostatus image attachments
-rw-r--r-- | Zotlabs/Module/Connections.php | 2 | ||||
-rw-r--r-- | include/feedutils.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index a880fc643..60b798c13 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -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'), diff --git a/include/feedutils.php b/include/feedutils.php index c530b7be7..1b7c22407 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -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 ); } } |