]> git.mxchange.org Git - friendica.git/commitdiff
Fix Photoalbum delete endpoint
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 29 Nov 2021 11:16:20 +0000 (06:16 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 29 Nov 2021 11:29:38 +0000 (06:29 -0500)
- Fix condition on a removed Item field

src/Module/Api/Friendica/Photoalbum/Delete.php

index 2d71e3581231e4d3d2a7afd04e8fba3c48d5dcb7..8a45de2d3632fb78497f9ea9e87bd51230cc3e20 100644 (file)
@@ -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