mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-03 18:30:47 +00:00
This commit is contained in:
parent
9d31f73bfa
commit
2c20d9e398
2 changed files with 37 additions and 17 deletions
|
@ -28,7 +28,24 @@ class Status extends Model
|
||||||
*/
|
*/
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
protected $fillable = ['profile_id', 'visibility', 'in_reply_to_id', 'reblog_of_id', 'type'];
|
protected $fillable = [
|
||||||
|
'scope',
|
||||||
|
'caption',
|
||||||
|
'rendered',
|
||||||
|
'url',
|
||||||
|
'uri',
|
||||||
|
'object_url',
|
||||||
|
'created_at',
|
||||||
|
'local',
|
||||||
|
'is_nsfw',
|
||||||
|
'scope',
|
||||||
|
'cw_summary',
|
||||||
|
'profile_id',
|
||||||
|
'visibility',
|
||||||
|
'in_reply_to_id',
|
||||||
|
'reblog_of_id',
|
||||||
|
'type'
|
||||||
|
];
|
||||||
|
|
||||||
const STATUS_TYPES = [
|
const STATUS_TYPES = [
|
||||||
'text',
|
'text',
|
||||||
|
|
|
@ -474,22 +474,25 @@ class Helpers {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$status = new Status;
|
$status = Status::updateOrCreate(
|
||||||
$status->profile_id = $pid;
|
[
|
||||||
$status->url = $url;
|
'uri' => $url
|
||||||
$status->uri = $url;
|
], [
|
||||||
$status->object_url = $id;
|
'profile_id' => $pid,
|
||||||
$status->caption = strip_tags($activity['content']);
|
'url' => $url,
|
||||||
$status->rendered = Purify::clean($activity['content']);
|
'object_url' => $id,
|
||||||
$status->created_at = Carbon::parse($ts)->tz('UTC');
|
'caption' => strip_tags($activity['content']),
|
||||||
$status->in_reply_to_id = $reply_to;
|
'rendered' => Purify::clean($activity['content']),
|
||||||
$status->local = false;
|
'created_at' => Carbon::parse($ts)->tz('UTC'),
|
||||||
$status->is_nsfw = $cw;
|
'in_reply_to_id' => $reply_to,
|
||||||
$status->scope = $scope;
|
'local' => false,
|
||||||
$status->visibility = $scope;
|
'is_nsfw' => $cw,
|
||||||
$status->cw_summary = $cw == true && isset($activity['summary']) ?
|
'scope' => $scope,
|
||||||
Purify::clean(strip_tags($activity['summary'])) : null;
|
'visibility' => $scope,
|
||||||
$status->save();
|
'cw_summary' => ($cw == true && isset($activity['summary']) ?
|
||||||
|
Purify::clean(strip_tags($activity['summary'])) : null)
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
if($reply_to == null) {
|
if($reply_to == null) {
|
||||||
self::importNoteAttachment($activity, $status);
|
self::importNoteAttachment($activity, $status);
|
||||||
|
|
Loading…
Reference in a new issue