forked from friendica/friendica-addons
Compare commits
6 commits
aa0d829de6
...
a52fa4dfb0
Author | SHA1 | Date | |
---|---|---|---|
Hypolite Petovan | a52fa4dfb0 | ||
Michael | cf435277a7 | ||
Hypolite Petovan | 61a5973937 | ||
Michael | d80d376762 | ||
Hypolite Petovan | 463f5eb7e0 | ||
csolisr | e91fa307d0 |
|
@ -659,8 +659,8 @@ function bluesky_create_post(array $item, stdClass $root = null, stdClass $paren
|
|||
|
||||
function bluesky_get_urls(string $body): array
|
||||
{
|
||||
// Remove all hashtags and mentions
|
||||
$body = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '', $body);
|
||||
// Remove all hashtag and mention links
|
||||
$body = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $body);
|
||||
|
||||
$urls = [];
|
||||
|
||||
|
@ -1150,16 +1150,12 @@ function bluesky_add_media(stdClass $embed, array $item, int $fetch_uid, int $le
|
|||
$shared = bluesky_get_header($embed->record->record, $uri, 0, $fetch_uid);
|
||||
$shared = bluesky_get_content($shared, $embed->record->record->value, $uri, $item['uid'], $level);
|
||||
if (!empty($shared)) {
|
||||
if (!empty($embed->record->embeds)) {
|
||||
if (!empty($embed->record->record->embeds)) {
|
||||
foreach ($embed->record->record->embeds as $single) {
|
||||
$shared = bluesky_add_media($single, $shared, $fetch_uid, $level);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($embed->media)) {
|
||||
bluesky_add_media($embed->media, $item, $fetch_uid, $level);
|
||||
}
|
||||
|
||||
$id = Item::insert($shared);
|
||||
$shared = Post::selectFirst(['uri-id'], ['id' => $id]);
|
||||
}
|
||||
|
@ -1167,6 +1163,10 @@ function bluesky_add_media(stdClass $embed, array $item, int $fetch_uid, int $le
|
|||
if (!empty($shared)) {
|
||||
$item['quote-uri-id'] = $shared['uri-id'];
|
||||
}
|
||||
|
||||
if (!empty($embed->media)) {
|
||||
bluesky_add_media($embed->media, $item, $fetch_uid, $level);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
position: absolute;
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
z-index: 11;
|
||||
z-index: 9;
|
||||
left: 0;
|
||||
display: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue