mirror of
https://github.com/friendica/friendica
synced 2025-04-26 14:30:13 +00:00
OStatus: Picture posts are reformatted
This commit is contained in:
parent
4798675e6e
commit
bb45112544
3 changed files with 18 additions and 4 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue