From c7a40906bfb3bce9ef88b08dbaf27ea1d53950ee Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 29 Nov 2021 06:16:20 -0500 Subject: [PATCH] Fix Photoalbum delete endpoint - Fix condition on a removed Item field --- src/Module/Api/Friendica/Photoalbum/Delete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Api/Friendica/Photoalbum/Delete.php b/src/Module/Api/Friendica/Photoalbum/Delete.php index 2d71e3581..8a45de2d3 100644 --- a/src/Module/Api/Friendica/Photoalbum/Delete.php +++ b/src/Module/Api/Friendica/Photoalbum/Delete.php @@ -58,7 +58,7 @@ class Delete extends BaseApi // function for setting the items to "deleted = 1" which ensures that comments, likes etc. are not shown anymore // to the user and the contacts of the users (drop_items() performs the federation of the deletion to other networks - $condition = ['uid' => $uid, 'resource-id' => $resourceIds, 'type' => 'photo']; + $condition = ['uid' => $uid, 'resource-id' => $resourceIds, 'post-type' => Item::PT_IMAGE, 'origin' => true]; Item::deleteForUser($condition, $uid); // now let's delete all photos from the album