mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-09 13:50:44 +00:00
commit
d2d051ea2a
4 changed files with 8 additions and 18 deletions
|
@ -65,6 +65,7 @@ class ImportCities extends Command
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
ini_set('memory_limit', '256M');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -347,7 +347,7 @@ class PublicApiController extends Controller
|
||||||
return $following->push($pid)->toArray();
|
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)
|
return Profile::whereIsPrivate(true)
|
||||||
->orWhere('unlisted', true)
|
->orWhere('unlisted', true)
|
||||||
->orWhere('status', '!=', null)
|
->orWhere('status', '!=', null)
|
||||||
|
|
|
@ -10,9 +10,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
protected $defaultIncludes = [
|
protected $defaultIncludes = [
|
||||||
'account',
|
'account',
|
||||||
'mentions',
|
|
||||||
'media_attachments',
|
'media_attachments',
|
||||||
'tags',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function transform(Status $status)
|
public function transform(Status $status)
|
||||||
|
@ -41,13 +39,15 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
],
|
],
|
||||||
'language' => null,
|
'language' => null,
|
||||||
'pinned' => null,
|
'pinned' => null,
|
||||||
|
'mentions' => [],
|
||||||
|
'tags' => [],
|
||||||
'pf_type' => $status->type ?? $status->setType(),
|
'pf_type' => $status->type ?? $status->setType(),
|
||||||
'reply_count' => (int) $status->reply_count,
|
'reply_count' => (int) $status->reply_count,
|
||||||
'comments_disabled' => $status->comments_disabled ? true : false,
|
'comments_disabled' => $status->comments_disabled ? true : false,
|
||||||
'thread' => false,
|
'thread' => false,
|
||||||
'replies' => [],
|
'replies' => [],
|
||||||
'parent' => [],
|
'parent' => [],
|
||||||
|
//'place' => $status->place
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,13 +58,6 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
return $this->item($account, new AccountTransformer());
|
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)
|
public function includeMediaAttachments(Status $status)
|
||||||
{
|
{
|
||||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($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,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run development",
|
"dev": "npm run development",
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
"vue-template-compiler": "^2.6.10"
|
"vue-template-compiler": "^2.6.10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@trevoreyre/autocomplete-vue": "^2.0.2",
|
||||||
"bootstrap-vue": "^2.0.0-rc.26",
|
"bootstrap-vue": "^2.0.0-rc.26",
|
||||||
"emoji-mart-vue": "^2.6.6",
|
"emoji-mart-vue": "^2.6.6",
|
||||||
"filesize": "^3.6.1",
|
"filesize": "^3.6.1",
|
||||||
|
@ -44,6 +46,7 @@
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
"twitter-text": "^2.0.5",
|
"twitter-text": "^2.0.5",
|
||||||
"vue-content-loader": "^0.2.2",
|
"vue-content-loader": "^0.2.2",
|
||||||
|
"vue-cropperjs": "^4.0.0",
|
||||||
"vue-infinite-loading": "^2.4.4",
|
"vue-infinite-loading": "^2.4.4",
|
||||||
"vue-loading-overlay": "^3.2.0",
|
"vue-loading-overlay": "^3.2.0",
|
||||||
"vue-timeago": "^5.1.2"
|
"vue-timeago": "^5.1.2"
|
||||||
|
|
Loading…
Reference in a new issue