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 19 additions and 1 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);

BIN
public/js/compose.js vendored

Binary file not shown.

BIN
public/js/spa.js vendored

Binary file not shown.

Binary file not shown.