kopia lustrzana https://github.com/pixelfed/pixelfed
commit
d2d051ea2a
|
@ -65,6 +65,7 @@ class ImportCities extends Command
|
|||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
ini_set('memory_limit', '256M');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -347,7 +347,7 @@ class PublicApiController extends Controller
|
|||
return $following->push($pid)->toArray();
|
||||
});
|
||||
|
||||
$private = Cache::remember('profiles:private', 1440, function() {
|
||||
$private = Cache::remember('profiles:private', now()->addMinutes(1440), function() {
|
||||
return Profile::whereIsPrivate(true)
|
||||
->orWhere('unlisted', true)
|
||||
->orWhere('status', '!=', null)
|
||||
|
|
|
@ -10,9 +10,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
{
|
||||
protected $defaultIncludes = [
|
||||
'account',
|
||||
'mentions',
|
||||
'media_attachments',
|
||||
'tags',
|
||||
];
|
||||
|
||||
public function transform(Status $status)
|
||||
|
@ -41,13 +39,15 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
],
|
||||
'language' => null,
|
||||
'pinned' => null,
|
||||
|
||||
'mentions' => [],
|
||||
'tags' => [],
|
||||
'pf_type' => $status->type ?? $status->setType(),
|
||||
'reply_count' => (int) $status->reply_count,
|
||||
'comments_disabled' => $status->comments_disabled ? true : false,
|
||||
'thread' => false,
|
||||
'replies' => [],
|
||||
'parent' => [],
|
||||
//'place' => $status->place
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -58,13 +58,6 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
return $this->item($account, new AccountTransformer());
|
||||
}
|
||||
|
||||
public function includeMentions(Status $status)
|
||||
{
|
||||
$mentions = $status->mentions;
|
||||
|
||||
return $this->collection($mentions, new MentionTransformer());
|
||||
}
|
||||
|
||||
public function includeMediaAttachments(Status $status)
|
||||
{
|
||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
|
||||
|
@ -74,11 +67,4 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function includeTags(Status $status)
|
||||
{
|
||||
$tags = $status->hashtags;
|
||||
|
||||
return $this->collection($tags, new HashtagTransformer());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"name": "pixelfed",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
|
@ -25,6 +26,7 @@
|
|||
"vue-template-compiler": "^2.6.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"@trevoreyre/autocomplete-vue": "^2.0.2",
|
||||
"bootstrap-vue": "^2.0.0-rc.26",
|
||||
"emoji-mart-vue": "^2.6.6",
|
||||
"filesize": "^3.6.1",
|
||||
|
@ -44,6 +46,7 @@
|
|||
"sweetalert": "^2.1.2",
|
||||
"twitter-text": "^2.0.5",
|
||||
"vue-content-loader": "^0.2.2",
|
||||
"vue-cropperjs": "^4.0.0",
|
||||
"vue-infinite-loading": "^2.4.4",
|
||||
"vue-loading-overlay": "^3.2.0",
|
||||
"vue-timeago": "^5.1.2"
|
||||
|
|
Ładowanie…
Reference in New Issue