Plaintext: The function now returns images from video links as well.
This commit is contained in:
parent
660bd39efa
commit
fe71272e1e
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ function get_attached_data($body) {
|
||||||
$post["type"] = "text";
|
$post["type"] = "text";
|
||||||
$post["text"] = trim($body);
|
$post["text"] = trim($body);
|
||||||
}
|
}
|
||||||
|
} elseif (isset($post["url"]) AND ($post["type"] == "video")) {
|
||||||
|
require_once("mod/parse_url.php");
|
||||||
|
$data = parseurl_getsiteinfo($post["url"], true);
|
||||||
|
|
||||||
|
if (isset($data["images"][0]))
|
||||||
|
$post["image"] = $data["images"][0]["src"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return($post);
|
return($post);
|
||||||
|
|
Loading…
Reference in a new issue