|
|
|
|
@ -90,14 +90,16 @@ class StatusService
|
|
|
|
|
unset($res['_pid']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// A client that resolves reblogs declares include_reblogs; one that
|
|
|
|
|
// only reads the top level renders a boost as an empty card, so give it
|
|
|
|
|
// the shared status there instead.
|
|
|
|
|
if (! $mastodonMode
|
|
|
|
|
// Legacy _pe clients that don't resolve `reblog` would render a boost
|
|
|
|
|
// as an empty card, so lift the shared content up. Never touch
|
|
|
|
|
// `account`: the top-level account is always the booster.
|
|
|
|
|
if (
|
|
|
|
|
! $mastodonMode
|
|
|
|
|
&& request()->has('_pe')
|
|
|
|
|
&& ! request()->filled('include_reblogs')
|
|
|
|
|
&& ! empty($res['reblog'])) {
|
|
|
|
|
foreach (['account', 'content', 'content_text', 'emojis', 'media_attachments'] as $key) {
|
|
|
|
|
&& ! empty($res['reblog'])
|
|
|
|
|
) {
|
|
|
|
|
foreach (['content', 'content_text', 'emojis', 'media_attachments'] as $key) {
|
|
|
|
|
if (array_key_exists($key, $res['reblog'])) {
|
|
|
|
|
$res[$key] = $res['reblog'][$key];
|
|
|
|
|
}
|
|
|
|
|
|