OStatus: Picture posts are reformatted

This commit is contained in:
Michael Vogel 2015-12-04 05:57:33 +01:00
parent 4798675e6e
commit bb45112544
3 changed files with 18 additions and 4 deletions

View file

@ -55,9 +55,10 @@ function get_attached_data($body) {
$data = parseurl_getsiteinfo_cached($pictures[0][1], true);
if ($data["type"] == "photo") {
$post["type"] = "photo";
if (isset($data["images"][0]))
if (isset($data["images"][0])) {
$post["image"] = $data["images"][0]["src"];
else
$post["url"] = $data["url"];
} else
$post["image"] = $data["url"];
$post["preview"] = $pictures[0][2];