mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 23:13:17 +00:00
Update Helpers.php
This commit is contained in:
parent
1d2f76c8e5
commit
8c39ef449a
1 changed files with 3 additions and 2 deletions
|
@ -689,13 +689,14 @@ class Helpers
|
||||||
return $option['replies']['totalItems'] ?? 0;
|
return $option['replies']['totalItems'] ?? 0;
|
||||||
})->toArray();
|
})->toArray();
|
||||||
|
|
||||||
|
$defaultCaption = config_cache('database.default') === 'mysql' ? null : "";
|
||||||
$status = new Status;
|
$status = new Status;
|
||||||
$status->profile_id = $profile->id;
|
$status->profile_id = $profile->id;
|
||||||
$status->url = isset($res['url']) ? $res['url'] : $url;
|
$status->url = isset($res['url']) ? $res['url'] : $url;
|
||||||
$status->uri = isset($res['url']) ? $res['url'] : $url;
|
$status->uri = isset($res['url']) ? $res['url'] : $url;
|
||||||
$status->object_url = $id;
|
$status->object_url = $id;
|
||||||
$status->caption = strip_tags(Purify::clean($res['content'])) ?? "";
|
$status->caption = strip_tags(Purify::clean($res['content'])) ?? $defaultCaption;
|
||||||
$status->rendered = "";
|
$status->rendered = $defaultCaption;
|
||||||
$status->created_at = Carbon::parse($ts)->tz('UTC');
|
$status->created_at = Carbon::parse($ts)->tz('UTC');
|
||||||
$status->in_reply_to_id = null;
|
$status->in_reply_to_id = null;
|
||||||
$status->local = false;
|
$status->local = false;
|
||||||
|
|
Loading…
Reference in a new issue