auto inline embed ostatus image attachments
This commit is contained in:
		| @@ -168,7 +168,7 @@ class Connections extends \Zotlabs\Web\Controller { | |||||||
| 			), | 			), | ||||||
| 	 | 	 | ||||||
| 			'archived' => array( | 			'archived' => array( | ||||||
| 				'label' => t('Archived'), | 				'label' => t('Archived/Unreachable'), | ||||||
| 				'url'   => z_root() . '/connections/archived', | 				'url'   => z_root() . '/connections/archived', | ||||||
| 				'sel'   => ($archived) ? 'active' : '', | 				'sel'   => ($archived) ? 'active' : '', | ||||||
| 				'title' => t('Only show archived/unreachable connections'), | 				'title' => t('Only show archived/unreachable connections'), | ||||||
|   | |||||||
| @@ -613,6 +613,10 @@ function get_atom_elements($feed, $item, &$author) { | |||||||
| 			if(! $type) | 			if(! $type) | ||||||
| 				$type = 'application/octet-stream'; | 				$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 ); | 			$res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title ); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user