diff --git a/CHANGELOG.md b/CHANGELOG.md
index 473605f11..6e81f76d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Fixed header background bug on MomentUI profiles ([#1933](https://github.com/pixelfed/pixelfed/pull/1933))
- Fixed TRUST_PROXIES configuration ([#1941](https://github.com/pixelfed/pixelfed/pull/1941))
- Fixed settings page default language ([4223a11e](https://github.com/pixelfed/pixelfed/commit/4223a11e))
+- Fixed DeleteAccountPipeline bug that did not use proper media paths ([578d2f35](https://github.com/pixelfed/pixelfed/commit/578d2f35))
### Changed
diff --git a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php
index 06e8191a6..735586576 100644
--- a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php
+++ b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php
@@ -30,6 +30,8 @@ use App\{
ReportLog,
StatusHashtag,
Status,
+ Story,
+ StoryView,
User,
UserDevice,
UserFilter,
@@ -91,11 +93,25 @@ class DeleteAccountPipeline implements ShouldQueue
Like::whereProfileId($id)->forceDelete();
});
+ DB::transaction(function() use ($user) {
+ $pid = $this->user->profile_id;
+
+ StoryView::whereProfileId($pid)->delete();
+ $stories = Story::whereProfileId($pid)->get();
+ foreach($stories as $story) {
+ $path = storage_path('app/'.$story->path);
+ if(is_file($path)) {
+ unlink($path);
+ }
+ $story->forceDelete();
+ }
+ });
+
DB::transaction(function() use ($user) {
$medias = Media::whereUserId($user->id)->get();
foreach($medias as $media) {
- $path = $media->media_path;
- $thumb = $media->thumbnail_path;
+ $path = storage_path('app/'.$media->media_path);
+ $thumb = storage_path('app/'.$media->thumbnail_path);
if(is_file($path)) {
unlink($path);
}
diff --git a/resources/views/admin/partial/template-full.blade.php b/resources/views/admin/partial/template-full.blade.php
index a018f8458..954dac3f9 100644
--- a/resources/views/admin/partial/template-full.blade.php
+++ b/resources/views/admin/partial/template-full.blade.php
@@ -23,16 +23,4 @@
-@endsection
-
-@push('scripts')
-
-@endpush
\ No newline at end of file
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/partial/template.blade.php b/resources/views/admin/partial/template.blade.php
index ab2368b6f..4ec312366 100644
--- a/resources/views/admin/partial/template.blade.php
+++ b/resources/views/admin/partial/template.blade.php
@@ -24,14 +24,4 @@
-@endsection
-
-@push('scripts')
-
-@endpush
\ No newline at end of file
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/partial/topnav.blade.php b/resources/views/admin/partial/topnav.blade.php
index c0ca084d6..bbc92ff10 100644
--- a/resources/views/admin/partial/topnav.blade.php
+++ b/resources/views/admin/partial/topnav.blade.php
@@ -1,4 +1,4 @@
-