1
0
Fork 0

Merge pull request #3251 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-02-16 02:46:46 -07:00 committed by GitHub
commit ddb784d423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 5 deletions

View File

@ -54,6 +54,7 @@
- Updated StatusController, set missing reblog/share type. ([548a12a4](https://github.com/pixelfed/pixelfed/commit/548a12a4))
- Updated index view, remove shortcut from favicon meta tag. Fixes #3196. ([6e2cb3cd](https://github.com/pixelfed/pixelfed/commit/6e2cb3cd))
- Updated CollectionController, fix broken unauthenticated access. Fixes #3242. ([bd249f0c](https://github.com/pixelfed/pixelfed/commit/bd249f0c))
- Updated ComposeController, add collection support to compose endpoint. ([ec2cfaf5](https://github.com/pixelfed/pixelfed/commit/ec2cfaf5))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)

View File

@ -7,6 +7,8 @@ use Auth, Cache, DB, Storage, URL;
use Carbon\Carbon;
use App\{
Avatar,
Collection,
CollectionItem,
Hashtag,
Like,
Media,
@ -449,7 +451,8 @@ class ComposeController extends Controller
'place' => 'nullable',
'comments_disabled' => 'nullable',
'tagged' => 'nullable',
'license' => 'nullable|integer|min:1|max:16'
'license' => 'nullable|integer|min:1|max:16',
'collections' => 'sometimes|array|min:1|max:5',
// 'optimize_media' => 'nullable'
]);
@ -572,6 +575,20 @@ class ComposeController extends Controller
MediaTagService::sendNotification($mt);
}
if($request->filled('collections')) {
$collections = Collection::whereProfileId($profile->id)
->find($request->input('collections'))
->each(function($collection) use($status) {
CollectionItem::firstOrCreate([
'collection_id' => $collection->id,
'object_type' => 'App\Status',
'object_id' => $status->id
], [
'order' => $collection->items()->count()
]);
});
}
NewStatusPipeline::dispatch($status);
Cache::forget('user:account:id:'.$profile->user_id);
Cache::forget('_api:statuses:recent_9:'.$profile->id);

File diff suppressed because one or more lines are too long

2
public/js/spa.js vendored

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
"/js/collectioncompose.js": "/js/collectioncompose.js?id=684458578e59365b9b7f",
"/js/collections.js": "/js/collections.js?id=0d1fc5ad7d4a47a8adbb",
"/js/components.js": "/js/components.js?id=2978883dc0ca9cd1681c",
"/js/compose.js": "/js/compose.js?id=f271c9d88b51dd147c33",
"/js/compose.js": "/js/compose.js?id=cde1d9492fd2586ec137",
"/js/compose-classic.js": "/js/compose-classic.js?id=ee4ad4759a55261c429c",
"/js/developers.js": "/js/developers.js?id=d578157a93aaa9070669",
"/js/direct.js": "/js/direct.js?id=76bdac276fca6ac60320",
@ -24,7 +24,7 @@
"/js/rempos.js": "/js/rempos.js?id=5f24e4ed251a202023f7",
"/js/rempro.js": "/js/rempro.js?id=2cc0d82e0cef827608c5",
"/js/search.js": "/js/search.js?id=dc888b173463dc3894ba",
"/js/spa.js": "/js/spa.js?id=ccb9c9b13405a5654721",
"/js/spa.js": "/js/spa.js?id=45d20b3c25a385475272",
"/js/status.js": "/js/status.js?id=5869d8f86d80221006d3",
"/js/stories.js": "/js/stories.js?id=f882708d5f00b4738dd7",
"/js/story-compose.js": "/js/story-compose.js?id=0f9d2f7ce5e63ef14c6a",