From 7faa9d8e61c89bc29c07a296f1f80de668383785 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 02:33:54 -0700 Subject: [PATCH 01/38] Add S3 + Stories --- app/Profile.php | 5 ++ app/Providers/AuthServiceProvider.php | 1 - app/Status.php | 8 +-- app/Story.php | 17 ++--- ...2019_12_25_042317_update_stories_table.php | 63 +++++++++++++++++++ resources/assets/js/story-compose.js | 4 ++ resources/assets/js/timeline.js | 5 ++ 7 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 database/migrations/2019_12_25_042317_update_stories_table.php create mode 100644 resources/assets/js/story-compose.js diff --git a/app/Profile.php b/app/Profile.php index e01ad368b..b386ffda6 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -303,4 +303,9 @@ class Profile extends Model ->whereFollowingId($this->id) ->exists(); } + + public function stories() + { + return $this->hasMany(Story::class); + } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 3448b3005..7e3b460f8 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -36,7 +36,6 @@ class AuthServiceProvider extends ServiceProvider 'read', 'write', 'follow', - 'push' ]); Passport::tokensCan([ diff --git a/app/Status.php b/app/Status.php index 5819d0961..ac04b31a4 100644 --- a/app/Status.php +++ b/app/Status.php @@ -131,13 +131,9 @@ class Status extends Model $media = $this->firstMedia(); $path = $media->media_path; $hash = is_null($media->processed_at) ? md5('unprocessed') : md5($media->created_at); - if(config('pixelfed.cloud_storage') == true) { - $url = Storage::disk(config('filesystems.cloud'))->url($path)."?v={$hash}"; - } else { - $url = Storage::url($path)."?v={$hash}"; - } + $url = $media->cdn_url ? $media->cdn_url . "?v={$hash}" : url(Storage::url($path)."?v={$hash}"); - return url($url); + return $url; } public function likes() diff --git a/app/Story.php b/app/Story.php index 104f0e58f..7473ea7f6 100644 --- a/app/Story.php +++ b/app/Story.php @@ -24,6 +24,8 @@ class Story extends Model */ protected $dates = ['published_at', 'expires_at']; + protected $fillable = ['profile_id']; + protected $visible = ['id']; public function profile() @@ -31,16 +33,6 @@ class Story extends Model return $this->belongsTo(Profile::class); } - public function items() - { - return $this->hasMany(StoryItem::class); - } - - public function reactions() - { - return $this->hasMany(StoryReaction::class); - } - public function views() { return $this->hasMany(StoryView::class); @@ -48,7 +40,8 @@ class Story extends Model public function seen($pid = false) { - $id = $pid ?? Auth::user()->profile->id; - return $this->views()->whereProfileId($id)->exists(); + return StoryView::whereStoryId($this->id) + ->whereProfileId(Auth::user()->profile->id) + ->exists(); } } diff --git a/database/migrations/2019_12_25_042317_update_stories_table.php b/database/migrations/2019_12_25_042317_update_stories_table.php new file mode 100644 index 000000000..da778225e --- /dev/null +++ b/database/migrations/2019_12_25_042317_update_stories_table.php @@ -0,0 +1,63 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::dropIfExists('stories'); + Schema::dropIfExists('story_items'); + Schema::dropIfExists('story_reactions'); + Schema::dropIfExists('story_views'); + + Schema::create('stories', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->bigInteger('profile_id')->unsigned()->index(); + $table->string('type')->nullable(); + $table->unsignedInteger('size')->nullable(); + $table->string('mime')->nullable(); + $table->smallInteger('duration')->unsigned(); + $table->string('path')->nullable(); + $table->string('cdn_url')->nullable(); + $table->boolean('public')->default(false)->index(); + $table->boolean('local')->default(false)->index(); + $table->unsignedInteger('view_count')->nullable(); + $table->unsignedInteger('comment_count')->nullable(); + $table->json('story')->nullable(); + $table->unique(['profile_id', 'path']); + $table->timestamp('expires_at')->index(); + $table->timestamps(); + }); + + Schema::create('story_views', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->bigInteger('story_id')->unsigned()->index(); + $table->bigInteger('profile_id')->unsigned()->index(); + $table->unique(['profile_id', 'story_id']); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('stories'); + Schema::dropIfExists('story_views'); + } +} diff --git a/resources/assets/js/story-compose.js b/resources/assets/js/story-compose.js new file mode 100644 index 000000000..d2af1dd2a --- /dev/null +++ b/resources/assets/js/story-compose.js @@ -0,0 +1,4 @@ +Vue.component( + 'story-compose', + require('./components/StoryCompose.vue').default +); \ No newline at end of file diff --git a/resources/assets/js/timeline.js b/resources/assets/js/timeline.js index 0e8b1488a..5858ac8e3 100644 --- a/resources/assets/js/timeline.js +++ b/resources/assets/js/timeline.js @@ -41,4 +41,9 @@ Vue.component( Vue.component( 'announcements-card', require('./components/AnnouncementsCard.vue').default +); + +Vue.component( + 'story-component', + require('./components/StoryTimelineComponent.vue').default ); \ No newline at end of file From 1960e8d6b4bb44c4702d4d8fcdec33bcb54846bb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 16:16:02 -0700 Subject: [PATCH 02/38] Update instance config, add stories --- config/instance.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/instance.php b/config/instance.php index ea37a5b30..3f4762fab 100644 --- a/config/instance.php +++ b/config/instance.php @@ -47,4 +47,8 @@ return [ 'custom' => env('USERNAME_REMOTE_CUSTOM_TEXT', null) ] ], + + 'stories' => [ + 'enabled' => env('STORIES_ENABLED', false), + ] ]; \ No newline at end of file From 2189dfb5f66848249dfe6d558d101d7d2394fc54 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 16:17:10 -0700 Subject: [PATCH 03/38] Add story compose blade view --- resources/views/stories/compose.blade.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 resources/views/stories/compose.blade.php diff --git a/resources/views/stories/compose.blade.php b/resources/views/stories/compose.blade.php new file mode 100644 index 000000000..2b4f16626 --- /dev/null +++ b/resources/views/stories/compose.blade.php @@ -0,0 +1,11 @@ +@extends('layouts.blank') + + +@section('content') + +@endsection + +@push('scripts') + + +@endpush \ No newline at end of file From 758e633c2c7a117a4a89aa37e53ef6031f0afa73 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 16:26:53 -0700 Subject: [PATCH 04/38] Update InternalApiController, fixes #1901 --- app/Http/Controllers/InternalApiController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/InternalApiController.php b/app/Http/Controllers/InternalApiController.php index 9cfff70ce..541988bf5 100644 --- a/app/Http/Controllers/InternalApiController.php +++ b/app/Http/Controllers/InternalApiController.php @@ -244,7 +244,7 @@ class InternalApiController extends Controller 'cw' => 'nullable|boolean', 'visibility' => 'required|string|in:public,private,unlisted|min:2|max:10', 'place' => 'nullable', - 'comments_disabled' => 'nullable|boolean' + 'comments_disabled' => 'nullable' ]); if(config('costar.enabled') == true) { @@ -301,7 +301,7 @@ class InternalApiController extends Controller } if($request->filled('comments_disabled')) { - $status->comments_disabled = $request->input('comments_disabled'); + $status->comments_disabled = (bool) $request->input('comments_disabled'); } $status->caption = strip_tags($request->caption); @@ -314,10 +314,6 @@ class InternalApiController extends Controller $media->save(); } - // $resource = new Fractal\Resource\Collection($status->media()->orderBy('order')->get(), new StatusMediaContainerTransformer()); - // $mediaContainer = $this->fractal->createData($resource)->toArray(); - // $status->media_container = json_encode($mediaContainer); - $visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility; $cw = $profile->cw == true ? true : $cw; $status->is_nsfw = $cw; From 8a231928f5087a9411137d7c6364b513988e0757 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 16:52:17 -0700 Subject: [PATCH 05/38] Update RestrictedNames --- app/Util/Lexer/RestrictedNames.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Util/Lexer/RestrictedNames.php b/app/Util/Lexer/RestrictedNames.php index 7aa2fd8ee..a7c32e42c 100644 --- a/app/Util/Lexer/RestrictedNames.php +++ b/app/Util/Lexer/RestrictedNames.php @@ -12,7 +12,6 @@ class RestrictedNames 'download', 'domainadmin', 'domainadministrator', - 'email', 'errors', 'events', 'example', @@ -26,7 +25,7 @@ class RestrictedNames 'hostmaster', 'imap', 'info', - 'info', + 'information', 'is', 'isatap', 'it', @@ -142,6 +141,8 @@ class RestrictedNames 'drives', 'driver', 'e', + 'email', + 'emails', 'error', 'explore', 'export', @@ -206,6 +207,10 @@ class RestrictedNames 'news', 'news', 'newsfeed', + 'newsroom', + 'newsrooms', + 'news-room', + 'news-rooms', 'o', 'oauth', 'official', From 1d9adc50dbc6cbb8e4e7c3400e010d13ab0e2780 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 19:29:50 -0700 Subject: [PATCH 06/38] Update webpack, add story-compose.js --- webpack.mix.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.mix.js b/webpack.mix.js index 9fcdc75bd..c519076c5 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -33,6 +33,7 @@ mix.js('resources/assets/js/app.js', 'public/js') .js('resources/assets/js/collectioncompose.js', 'public/js') .js('resources/assets/js/collections.js', 'public/js') .js('resources/assets/js/profile-directory.js', 'public/js') +.js('resources/assets/js/story-compose.js', 'public/js') // .js('resources/assets/js/embed.js', 'public') // .js('resources/assets/js/direct.js', 'public/js') // .js('resources/assets/js/admin.js', 'public/js') From 090368d8b38cd1774081ed18a228dcc8783b0dfd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 20:15:03 -0700 Subject: [PATCH 07/38] Update ComposeModal --- .../assets/js/components/ComposeModal.vue | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index daced1ef2..56712bb0f 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -84,21 +84,22 @@
- -
+ +
@@ -107,6 +108,9 @@

Add to Story + + BETA +

Add a photo or video to your story.

@@ -130,24 +134,7 @@
-
-
-
-
- -
-
-

- Try ComposeUI v4 - - BETA - -

-

The next generation compose experience.

-
-
-
-
+

Help

From 5a7ebe705785f146409d651e3c79263f254589b1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 20:16:21 -0700 Subject: [PATCH 08/38] Update Site Config --- app/Util/Site/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index ffa80a522..096625087 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -51,7 +51,7 @@ class Config { 'features' => [ 'mobile_apis' => config('pixelfed.oauth_enabled'), 'circles' => false, - 'stories' => false, + 'stories' => config('instance.stories.enabled'), 'video' => Str::contains(config('pixelfed.media_types'), 'video/mp4'), 'import' => [ 'instagram' => config('pixelfed.import.instagram.enabled'), From 01dd5db7f533ab7c2d96465ffa4d811d94a9b8d4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 21:58:21 -0700 Subject: [PATCH 09/38] Update scheduler, add StoryGC command --- app/Console/Commands/StoryGC.php | 64 ++++++++++++++++++++++++++++++++ app/Console/Kernel.php | 1 + 2 files changed, 65 insertions(+) create mode 100644 app/Console/Commands/StoryGC.php diff --git a/app/Console/Commands/StoryGC.php b/app/Console/Commands/StoryGC.php new file mode 100644 index 000000000..f6271bb15 --- /dev/null +++ b/app/Console/Commands/StoryGC.php @@ -0,0 +1,64 @@ +take(50)->get(); + + if($stories->count() == 0) { + exit; + } + + foreach($stories as $story) { + if(Storage::exists($story->path) == true) { + Storage::delete($story->path); + } + DB::transaction(function() use($story) { + StoryView::whereStoryId($story->id)->delete(); + $story->delete(); + }); + } + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 18057725e..1e3364afc 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,6 +30,7 @@ class Kernel extends ConsoleKernel $schedule->command('media:gc') ->hourly(); $schedule->command('horizon:snapshot')->everyFiveMinutes(); + $schedule->command('story:gc')->everyFiveMinutes(); } /** From b08b36127c15b19adcfe01b16ae0a80d05689219 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 22:00:55 -0700 Subject: [PATCH 10/38] Update AP Helpers --- app/Util/ActivityPub/Helpers.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index a70d828de..e6d85baec 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -406,7 +406,6 @@ class Helpers { $remoteUsername = "@{$username}@{$domain}"; abort_if(!self::validateUrl($res['inbox']), 400); - abort_if(!self::validateUrl($res['outbox']), 400); abort_if(!self::validateUrl($res['id']), 400); $profile = Profile::whereRemoteUrl($res['id'])->first(); @@ -451,4 +450,20 @@ class Helpers { $response = curl_exec($ch); return; } + + public static function apSignedPostRequest($senderProfile, $url, $body) + { + abort_if(!self::validateUrl($url), 400); + + $payload = json_encode($body); + $headers = HttpSignature::sign($senderProfile, $url, $body); + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); + curl_setopt($ch, CURLOPT_HEADER, true); + $response = curl_exec($ch); + return; + } } From 25365db6e94ac03917a1b8357c962a86d5b29a8e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 22:15:34 -0700 Subject: [PATCH 11/38] Update composer.lock --- composer.lock | 148 +++++++++++++++++++++++++------------------------- 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/composer.lock b/composer.lock index d4c9da6aa..c6a6bfff7 100644 --- a/composer.lock +++ b/composer.lock @@ -60,16 +60,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.125.0", + "version": "3.128.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "d9ffe7cf9cc93d3c49f4f6d2db6cf0c469686f9c" + "reference": "a81485e12b2545aff17134bbf29442037f3fcadb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d9ffe7cf9cc93d3c49f4f6d2db6cf0c469686f9c", - "reference": "d9ffe7cf9cc93d3c49f4f6d2db6cf0c469686f9c", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a81485e12b2545aff17134bbf29442037f3fcadb", + "reference": "a81485e12b2545aff17134bbf29442037f3fcadb", "shasum": "" }, "require": { @@ -94,7 +94,8 @@ "nette/neon": "^2.3", "phpunit/phpunit": "^4.8.35|^5.4.3", "psr/cache": "^1.0", - "psr/simple-cache": "^1.0" + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -139,7 +140,7 @@ "s3", "sdk" ], - "time": "2019-12-02T23:15:42+00:00" + "time": "2019-12-10T19:12:09+00:00" }, { "name": "barryvdh/laravel-cors", @@ -448,25 +449,25 @@ }, { "name": "dnoegel/php-xdg-base-dir", - "version": "0.1", + "version": "v0.1.1", "source": { "type": "git", "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "@stable" + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, - "type": "project", + "type": "library", "autoload": { "psr-4": { "XdgBaseDir\\": "src/" @@ -477,7 +478,7 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" + "time": "2019-12-04T15:06:13+00:00" }, { "name": "doctrine/cache", @@ -1246,16 +1247,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.4.1", + "version": "6.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11" + "reference": "dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5", + "reference": "dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5", "shasum": "" }, "require": { @@ -1270,12 +1271,13 @@ "psr/log": "^1.1" }, "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "6.5-dev" } }, "autoload": { @@ -1308,7 +1310,7 @@ "rest", "web service" ], - "time": "2019-10-23T15:58:00+00:00" + "time": "2019-12-07T18:20:45+00:00" }, { "name": "guzzlehttp/promises", @@ -1592,16 +1594,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.89", + "version": "v1.2.90", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "374d699ce4944107015eee0798eab072e3c47df9" + "reference": "35f963386e6a189697fe4b14dc91fb42b17fda4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/374d699ce4944107015eee0798eab072e3c47df9", - "reference": "374d699ce4944107015eee0798eab072e3c47df9", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/35f963386e6a189697fe4b14dc91fb42b17fda4b", + "reference": "35f963386e6a189697fe4b14dc91fb42b17fda4b", "shasum": "" }, "require": { @@ -1637,7 +1639,7 @@ "crawlerdetect", "php crawler detect" ], - "time": "2019-11-16T13:47:52+00:00" + "time": "2019-12-08T20:03:27+00:00" }, { "name": "jenssegers/agent", @@ -1710,16 +1712,16 @@ }, { "name": "laravel/framework", - "version": "v6.6.0", + "version": "v6.7.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b48528ba5422ac909dbabf0b1cc34534928e7bce" + "reference": "ba4204f3a8b9672b6116398c165bd9c0c6eac077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b48528ba5422ac909dbabf0b1cc34534928e7bce", - "reference": "b48528ba5422ac909dbabf0b1cc34534928e7bce", + "url": "https://api.github.com/repos/laravel/framework/zipball/ba4204f3a8b9672b6116398c165bd9c0c6eac077", + "reference": "ba4204f3a8b9672b6116398c165bd9c0c6eac077", "shasum": "" }, "require": { @@ -1815,7 +1817,7 @@ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0)", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", @@ -1852,7 +1854,7 @@ "framework", "laravel" ], - "time": "2019-11-26T15:33:08+00:00" + "time": "2019-12-10T16:01:57+00:00" }, { "name": "laravel/helpers", @@ -1909,16 +1911,16 @@ }, { "name": "laravel/horizon", - "version": "v3.4.3", + "version": "v3.4.4", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6" + "reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/37226dd66318014fac20351b4cc7ca209dd4ccb6", - "reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6", + "url": "https://api.github.com/repos/laravel/horizon/zipball/7c36d24b200b60a059ab20f5b53f5bb6f4d2da40", + "reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40", "shasum": "" }, "require": { @@ -1926,9 +1928,9 @@ "ext-json": "*", "ext-pcntl": "*", "ext-posix": "*", - "illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/queue": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/contracts": "~5.7.0|~5.8.0|^6.0", + "illuminate/queue": "~5.7.0|~5.8.0|^6.0", + "illuminate/support": "~5.7.0|~5.8.0|^6.0", "php": ">=7.1.0", "predis/predis": "^1.1", "ramsey/uuid": "^3.5", @@ -1937,7 +1939,7 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^3.7|^4.0|^5.0", + "orchestra/testbench": "^3.7|^4.0", "phpunit/phpunit": "^7.0|^8.0" }, "type": "library", @@ -1974,7 +1976,7 @@ "laravel", "queue" ], - "time": "2019-11-19T16:23:21+00:00" + "time": "2019-12-10T16:50:59+00:00" }, { "name": "laravel/passport", @@ -2217,16 +2219,16 @@ }, { "name": "league/flysystem", - "version": "1.0.57", + "version": "1.0.61", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a" + "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fb13c01784a6c9f165a351e996871488ca2d8c9", + "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9", "shasum": "" }, "require": { @@ -2297,7 +2299,7 @@ "sftp", "storage" ], - "time": "2019-10-16T21:01:05+00:00" + "time": "2019-12-08T21:46:50+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -4061,20 +4063,20 @@ }, { "name": "psy/psysh", - "version": "v0.9.11", + "version": "v0.9.12", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "75d9ac1c16db676de27ab554a4152b594be4748e" + "reference": "90da7f37568aee36b116a030c5f99c915267edd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/75d9ac1c16db676de27ab554a4152b594be4748e", - "reference": "75d9ac1c16db676de27ab554a4152b594be4748e", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", + "reference": "90da7f37568aee36b116a030c5f99c915267edd4", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1", + "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", @@ -4131,7 +4133,7 @@ "interactive", "shell" ], - "time": "2019-11-27T22:44:29+00:00" + "time": "2019-12-06T14:19:43+00:00" }, { "name": "ralouphie/getallheaders", @@ -6485,19 +6487,19 @@ "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "55cd3f5e892eee6f5aca414d465cc224b062bea6" + "reference": "35638e4f5e714a12dec5ca062e68c625c1309c1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/55cd3f5e892eee6f5aca414d465cc224b062bea6", - "reference": "55cd3f5e892eee6f5aca414d465cc224b062bea6", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/35638e4f5e714a12dec5ca062e68c625c1309c1c", + "reference": "35638e4f5e714a12dec5ca062e68c625c1309c1c", "shasum": "" }, "require": { "illuminate/routing": "^5.5|^6", "illuminate/session": "^5.5|^6", "illuminate/support": "^5.5|^6", - "maximebf/debugbar": "~1.15.0", + "maximebf/debugbar": "^1.15", "php": ">=7.0", "symfony/debug": "^3|^4|^5", "symfony/finder": "^3|^4|^5" @@ -6545,7 +6547,7 @@ "profiler", "webprofiler" ], - "time": "2019-11-24T09:49:45+00:00" + "time": "2019-12-07T09:33:13+00:00" }, { "name": "composer/ca-bundle", @@ -7460,20 +7462,20 @@ }, { "name": "maximebf/debugbar", - "version": "v1.15.1", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + "reference": "6ca3502de5e5889dc21311d2461f8cc3b6a094b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6ca3502de5e5889dc21311d2461f8cc3b6a094b1", + "reference": "6ca3502de5e5889dc21311d2461f8cc3b6a094b1", "shasum": "" }, "require": { - "php": ">=5.6", + "php": "^7.1", "psr/log": "^1.0", "symfony/var-dumper": "^2.6|^3|^4" }, @@ -7488,7 +7490,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -7517,7 +7519,7 @@ "debug", "debugbar" ], - "time": "2019-09-24T14:55:42+00:00" + "time": "2019-10-18T14:34:16+00:00" }, { "name": "mockery/mockery", @@ -8617,16 +8619,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.4.3", + "version": "8.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e" + "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", - "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", "shasum": "" }, "require": { @@ -8670,7 +8672,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.4-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -8696,7 +8698,7 @@ "testing", "xunit" ], - "time": "2019-11-06T09:42:23+00:00" + "time": "2019-12-06T05:41:38+00:00" }, { "name": "scrivo/highlight.php", @@ -9602,16 +9604,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.2", + "version": "3.5.3", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7" + "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/65b12cdeaaa6cd276d4c3033a95b9b88b12701e7", - "reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", + "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", "shasum": "" }, "require": { @@ -9649,7 +9651,7 @@ "phpcs", "standards" ], - "time": "2019-10-28T04:36:32+00:00" + "time": "2019-12-04T04:46:47+00:00" }, { "name": "symfony/http-client", From 1810ef85947259466b12a41b605316856c3eaba5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 22:16:11 -0700 Subject: [PATCH 12/38] Update passport config --- config/passport.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 config/passport.php diff --git a/config/passport.php b/config/passport.php new file mode 100644 index 000000000..a4565f372 --- /dev/null +++ b/config/passport.php @@ -0,0 +1,20 @@ + env('PASSPORT_PRIVATE_KEY'), + + 'public_key' => env('PASSPORT_PUBLIC_KEY'), + +]; From 504694d4958de4ad2af8338b4a81c8cae1c60beb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Dec 2019 22:17:09 -0700 Subject: [PATCH 13/38] Update Timeline.vue, add StoryComponent --- resources/assets/js/components/Timeline.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 0f38efdca..601dfe492 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -3,6 +3,7 @@
+
From e8b30ed89860fc4305dc61f58009a9a392b37172 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 2 Jan 2020 15:13:47 -0700 Subject: [PATCH 14/38] Add StoryViewer Component --- resources/assets/js/components/Profile.vue | 39 ++++++- .../assets/js/components/StoryViewer.vue | 106 ++++++++++++++++++ 2 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 resources/assets/js/components/StoryViewer.vue diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index ecec7cc18..eff47cec8 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -35,7 +35,12 @@
- +
+ +
+
+ +
@@ -72,7 +77,12 @@
- +
+ +
+
+ +

- -

Show Tips on Timelines (Desktop Only)

+ +

Show Announcements on Timelines (Desktop Only)

From 64a8a7d43f8bcca845100aec1f7e2570ea298bc5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 6 Jan 2020 23:15:11 -0700 Subject: [PATCH 24/38] Update Timeline.vue component --- resources/assets/js/components/Timeline.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 601dfe492..617d0e2af 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -2,7 +2,6 @@
-
@@ -256,9 +255,9 @@
-
+
From 894ce91f22d09ea90da1f11cf239972371bfc8a0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 6 Jan 2020 23:15:37 -0700 Subject: [PATCH 25/38] Update StoryViewer.vue component --- resources/assets/js/components/StoryViewer.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/assets/js/components/StoryViewer.vue b/resources/assets/js/components/StoryViewer.vue index 25bb67390..3bc1f8143 100644 --- a/resources/assets/js/components/StoryViewer.vue +++ b/resources/assets/js/components/StoryViewer.vue @@ -15,12 +15,6 @@
- - + + +@endpush \ No newline at end of file From 060009a88b76416ab2d5a14493b8bb0001dba551 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 7 Jan 2020 00:41:37 -0700 Subject: [PATCH 36/38] Update ComposeModal.vue component --- resources/assets/js/components/ComposeModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 838484180..37a633045 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -112,7 +112,7 @@ BETA

-

Add a photo to your story

+

Add Photo to Story

From 38f8c9fd910d155523d3a2fb37f4533f7233f0cc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 7 Jan 2020 00:47:34 -0700 Subject: [PATCH 37/38] Update compiled assets --- public/js/compose.js | Bin 98733 -> 98724 bytes public/mix-manifest.json | Bin 1815 -> 1815 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/compose.js b/public/js/compose.js index 2851eabe9936577c1811bc6cb57d687143e166fb..30d7f8f48a9607c3ccc86511968fec8f46d75f1d 100644 GIT binary patch delta 267 zcmZ46%(kSNZ9^6J<_7+QGOR()rao4a<0px+XKE+~2d5cNerVUp0%AyNvsiBnYXX&P-X`QK;r;(_smsqO<5&-F7Hn#Mi9HY^-xzVoFXtPn_ z!qs5y+po(oGDk}#Dimbom*gt|QDuH{8W~^rH^!^$~&+TRvjCP!G_e`&8 HWYhov6#QCh diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 80ee11d5310e875ba9126248606cdde23571e010..d13dff484d33c54c85dedb4293cf53e4e91fcc6f 100644 GIT binary patch delta 33 ocmbQvH=S>TGqZ@Xsi~n!nz@Okd9sB?nvuC_N~+oBaOMNd0GTuiJ^%m! delta 33 ocmbQvH=S>TGqZ?Anz4bQK}wpXv2jvjlBKy>l4 Date: Tue, 7 Jan 2020 00:52:13 -0700 Subject: [PATCH 38/38] Update web routes --- routes/web.php | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/web.php b/routes/web.php index 2140f9312..ea77b10d3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -179,6 +179,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact Route::post('moderate', 'Api\AdminApiController@moderate'); }); Route::group(['prefix' => 'stories'], function () { + Route::get('v1/recent', 'StoryController@apiV1Recent'); Route::post('v1/add', 'StoryController@apiV1Add')->middleware('throttle:maxStoriesPerDay,1440'); Route::get('v1/fetch/{id}', 'StoryController@apiV1Fetch'); Route::get('v1/profile/{id}', 'StoryController@apiV1Profile');