mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 07:23:40 +00:00
Merge pull request #1096 from annando/post-type
Twitter: Setting the "post-type"
This commit is contained in:
commit
c7528b95b6
1 changed files with 5 additions and 1 deletions
|
@ -1462,6 +1462,8 @@ function twitter_expand_entities($body, stdClass $status, $picture)
|
||||||
$body = Strings::substringReplace($body, $parameters['replace'], $startIndex, $parameters['length']);
|
$body = Strings::substringReplace($body, $parameters['replace'], $startIndex, $parameters['length']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$body = trim($body);
|
||||||
|
|
||||||
// Footer will be taken care of with a share block in the case of a quote
|
// Footer will be taken care of with a share block in the case of a quote
|
||||||
if (empty($status->quoted_status)) {
|
if (empty($status->quoted_status)) {
|
||||||
$footer = '';
|
$footer = '';
|
||||||
|
@ -1478,7 +1480,7 @@ function twitter_expand_entities($body, stdClass $status, $picture)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['body' => $body, 'plain' => trim($plain), 'taglist' => $taglist];
|
return ['body' => trim($body), 'plain' => trim($plain), 'taglist' => $taglist];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1529,8 +1531,10 @@ function twitter_media_entities($post, array &$postarray)
|
||||||
}
|
}
|
||||||
|
|
||||||
$postarray['object-type'] = Activity\ObjectType::IMAGE;
|
$postarray['object-type'] = Activity\ObjectType::IMAGE;
|
||||||
|
$postarray['post-type'] = Item::PT_IMAGE;
|
||||||
break;
|
break;
|
||||||
case 'video':
|
case 'video':
|
||||||
|
$postarray['post-type'] = Item::PT_VIDEO;
|
||||||
case 'animated_gif':
|
case 'animated_gif':
|
||||||
if (!empty($medium->ext_alt_text)) {
|
if (!empty($medium->ext_alt_text)) {
|
||||||
Logger::info('Got text description', ['alt_text' => $medium->ext_alt_text]);
|
Logger::info('Got text description', ['alt_text' => $medium->ext_alt_text]);
|
||||||
|
|
Loading…
Reference in a new issue