diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fae8ec20..0f39660d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### New Features - Portfolios ([#3705](https://github.com/pixelfed/pixelfed/pull/3705)) - Server Directory ([#3762](https://github.com/pixelfed/pixelfed/pull/3762)) +- Manually verify email address (php artisan user:verifyemail) ([682f5f0f](https://github.com/pixelfed/pixelfed/commit/682f5f0f)) ### Updates - Update ApiV1Controller, include self likes in favourited_by endpoint ([58b331d2](https://github.com/pixelfed/pixelfed/commit/58b331d2)) diff --git a/app/Console/Commands/SendUpdateActor.php b/app/Console/Commands/SendUpdateActor.php index f0c753760..a874ee7c8 100644 --- a/app/Console/Commands/SendUpdateActor.php +++ b/app/Console/Commands/SendUpdateActor.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use Illuminate\Console\Command; +use Storage; use App\Profile; use App\User; use App\Instance; @@ -64,6 +65,7 @@ class SendUpdateActor extends Command return; } } + $this->touchStorageCache($domain); $this->line(' '); $this->error('Keep this window open during this process or it will not complete!'); $sharedInbox = Profile::whereDomain($domain)->whereNotNull('sharedInbox')->first(); @@ -76,8 +78,13 @@ class SendUpdateActor extends Command $this->info('Found sharedInbox: ' . $url); $bar = $this->output->createProgressBar($totalUserCount); $bar->start(); - User::whereNull('status')->chunk(50, function($users) use($bar, $url) { + + $startCache = $this->getStorageCache($domain); + User::whereNull('status')->when($startCache, function($query, $startCache) { + return $query->where('id', '>', $startCache); + })->chunk(50, function($users) use($bar, $url, $domain) { foreach($users as $user) { + $this->updateStorageCache($domain, $user->id); $profile = Profile::find($user->profile_id); if(!$profile) { continue; @@ -120,6 +127,26 @@ class SendUpdateActor extends Command ]; } + protected function touchStorageCache($domain) + { + $path = 'actor-update-cache/' . $domain; + if(!Storage::exists($path)) { + Storage::put($path, ""); + } + } + + protected function getStorageCache($domain) + { + $path = 'actor-update-cache/' . $domain; + return Storage::get($path); + } + + protected function updateStorageCache($domain, $value) + { + $path = 'actor-update-cache/' . $domain; + Storage::put($path, $value); + } + protected function actorObject($profile) { $permalink = $profile->permalink(); diff --git a/app/Console/Commands/UserVerifyEmail.php b/app/Console/Commands/UserVerifyEmail.php new file mode 100644 index 000000000..3b3cac5ef --- /dev/null +++ b/app/Console/Commands/UserVerifyEmail.php @@ -0,0 +1,53 @@ +argument('username'))->first(); + + if(!$user) { + $this->error('Username not found'); + return; + } + + $user->email_verified_at = now(); + $user->save(); + $this->info('Successfully verified email address for ' . $user->username); + } +} diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index c2ab4ac1e..ea555dfd4 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -692,10 +692,10 @@ class ApiV1Controller extends Controller (new FollowerController())->sendFollow($user->profile, $target); } } else { - $follower = new Follower(); - $follower->profile_id = $user->profile_id; - $follower->following_id = $target->id; - $follower->save(); + $follower = Follower::firstOrCreate([ + 'profile_id' => $user->profile_id, + 'following_id' => $target->id + ]); if($remote == true && config('federation.activitypub.remoteFollow') == true) { (new FollowerController())->sendFollow($user->profile, $target); diff --git a/config/federation.php b/config/federation.php index 91575abd9..4b6795687 100644 --- a/config/federation.php +++ b/config/federation.php @@ -16,7 +16,7 @@ return [ 'inbox' => env('AP_INBOX', true), 'sharedInbox' => env('AP_SHAREDINBOX', true), - 'remoteFollow' => env('AP_REMOTE_FOLLOW', false), + 'remoteFollow' => env('AP_REMOTE_FOLLOW', true), 'delivery' => [ 'timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 30.0), diff --git a/resources/lang/cs/helpcenter.php b/resources/lang/cs/helpcenter.php index 29dbc5aec..70ff2d0f9 100644 --- a/resources/lang/cs/helpcenter.php +++ b/resources/lang/cs/helpcenter.php @@ -25,4 +25,4 @@ return [ 'taggingPeople' => 'Označování lidí' -] +]; diff --git a/resources/lang/me/web.php b/resources/lang/me/web.php deleted file mode 100644 index 3844f847a..000000000 --- a/resources/lang/me/web.php +++ /dev/null @@ -1,186 +0,0 @@ - [ - 'comment' => 'Comment', - 'commented' => 'Commented', - 'comments' => 'Comments', - 'like' => 'Like', - 'liked' => 'Liked', - 'likes' => 'Likes', - 'share' => 'Share', - 'shared' => 'Shared', - 'shares' => 'Shares', - 'unshare' => 'Unshare', - - 'cancel' => 'Cancel', - 'copyLink' => 'Copy Link', - 'delete' => 'Delete', - 'error' => 'Error', - 'errorMsg' => 'Something went wrong. Please try again later.', - 'oops' => 'Oops!', - 'other' => 'Other', - 'readMore' => 'Read more', - 'success' => 'Success', - - 'sensitive' => 'Sensitive', - 'sensitiveContent' => 'Sensitive Content', - 'sensitiveContentWarning' => 'This post may contain sensitive content', - ], - - 'site' => [ - 'terms' => 'Terms of Use', - 'privacy' => 'Privacy Policy', - ], - - 'navmenu' => [ - 'search' => 'Search', - 'admin' => 'Admin Dashboard', - - // Timelines - 'homeFeed' => 'Home Feed', - 'localFeed' => 'Local Feed', - 'globalFeed' => 'Global Feed', - - // Core features - 'discover' => 'Discover', - 'directMessages' => 'Direct Messages', - 'notifications' => 'Notifications', - 'groups' => 'Groups', - 'stories' => 'Stories', - - // Self links - 'profile' => 'Profile', - 'drive' => 'Drive', - 'settings' => 'Settings', - 'compose' => 'Create New', - 'logout' => 'Logout', - - // Nav footer - 'about' => 'About', - 'help' => 'Help', - 'language' => 'Language', - 'privacy' => 'Privacy', - 'terms' => 'Terms', - - // Temporary links - 'backToPreviousDesign' => 'Go back to previous design' - ], - - 'directMessages' => [ - 'inbox' => 'Inbox', - 'sent' => 'Sent', - 'requests' => 'Requests' - ], - - 'notifications' => [ - 'liked' => 'liked your', - 'commented' => 'commented on your', - 'reacted' => 'reacted to your', - 'shared' => 'shared your', - 'tagged' => 'tagged you in a', - - 'updatedA' => 'updated a', - 'sentA' => 'sent a', - - 'followed' => 'followed', - 'mentioned' => 'mentioned', - 'you' => 'you', - - 'yourApplication' => 'Your application to join', - 'applicationApproved' => 'was approved!', - 'applicationRejected' => 'was rejected. You can re-apply to join in 6 months.', - - 'dm' => 'dm', - 'groupPost' => 'group post', - 'modlog' => 'modlog', - 'post' => 'post', - 'story' => 'story', - ], - - 'post' => [ - 'shareToFollowers' => 'Share to followers', - 'shareToOther' => 'Share to other', - 'noLikes' => 'No likes yet', - 'uploading' => 'Uploading', - ], - - 'profile' => [ - 'posts' => 'Posts', - 'followers' => 'Followers', - 'following' => 'Following', - 'admin' => 'Admin', - 'collections' => 'Collections', - 'follow' => 'Follow', - 'unfollow' => 'Unfollow', - 'editProfile' => 'Edit Profile', - 'followRequested' => 'Follow Requested', - 'joined' => 'Joined', - - 'emptyCollections' => 'We can\'t seem to find any collections', - 'emptyPosts' => 'We can\'t seem to find any posts', - ], - - 'menu' => [ - 'viewPost' => 'View Post', - 'viewProfile' => 'View Profile', - 'moderationTools' => 'Moderation Tools', - 'report' => 'Report', - 'archive' => 'Archive', - 'unarchive' => 'Unarchive', - 'embed' => 'Embed', - - 'selectOneOption' => 'Select one of the following options', - 'unlistFromTimelines' => 'Unlist from Timelines', - 'addCW' => 'Add Content Warning', - 'removeCW' => 'Remove Content Warning', - 'markAsSpammer' => 'Mark as Spammer', - 'markAsSpammerText' => 'Unlist + CW existing and future posts', - 'spam' => 'Spam', - 'sensitive' => 'Sensitive Content', - 'abusive' => 'Abusive or Harmful', - 'underageAccount' => 'Underage Account', - 'copyrightInfringement' => 'Copyright Infringement', - 'impersonation' => 'Impersonation', - 'scamOrFraud' => 'Scam or Fraud', - 'confirmReport' => 'Confirm Report', - 'confirmReportText' => 'Are you sure you want to report this post?', - 'reportSent' => 'Report Sent!', - 'reportSentText' => 'We have successfully received your report.', - 'reportSentError' => 'There was an issue reporting this post.', - - 'modAddCWConfirm' => 'Are you sure you want to add a content warning to this post?', - 'modCWSuccess' => 'Successfully added content warning', - 'modRemoveCWConfirm' => 'Are you sure you want to remove the content warning on this post?', - 'modRemoveCWSuccess' => 'Successfully removed content warning', - 'modUnlistConfirm' => 'Are you sure you want to unlist this post?', - 'modUnlistSuccess' => 'Successfully unlisted post', - 'modMarkAsSpammerConfirm' => 'Are you sure you want to mark this user as a spammer? All existing and future posts will be unlisted on timelines and a content warning will be applied.', - 'modMarkAsSpammerSuccess' => 'Successfully marked account as spammer', - - 'toFollowers' => 'to Followers', - - 'showCaption' => 'Show Caption', - 'showLikes' => 'Show Likes', - 'compactMode' => 'Compact Mode', - 'embedConfirmText' => 'By using this embed, you agree to our', - - 'deletePostConfirm' => 'Are you sure you want to delete this post?', - 'archivePostConfirm' => 'Are you sure you want to archive this post?', - 'unarchivePostConfirm' => 'Are you sure you want to unarchive this post?', - ], - - 'story' => [ - 'add' => 'Add Story' - ], - - 'timeline' => [ - 'peopleYouMayKnow' => 'People you may know' - ], - - 'hashtags' => [ - 'emptyFeed' => 'We can\'t seem to find any posts for this hashtag' - ], - -];