]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Merge pull request #4429 from MrPetovan/bug/4426-handle-auth-exceptions
[friendica.git] / src / Protocol / OStatus.php
index e4894cf5476f1c5ec50b8a730b0ce5f84f1b9f76..1ff13c55db3eae097cb641778f26e563811b74a6 100644 (file)
@@ -25,7 +25,6 @@ use DOMDocument;
 use DOMXPath;
 
 require_once 'include/dba.php';
-require_once 'include/threads.php';
 require_once 'include/html2bbcode.php';
 require_once 'include/bbcode.php';
 require_once 'include/items.php';
@@ -553,16 +552,7 @@ class OStatus
                        return;
                }
 
-               // Currently we don't have a central deletion function that we could use in this case
-               // The function "item_drop" doesn't work for that case
-               dba::update(
-                       'item',
-                       ['deleted' => true, 'title' => '', 'body' => '',
-                                       'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()],
-                       ['id' => $deleted["id"]]
-               );
-
-               delete_thread($deleted["id"], $deleted["parent-uri"]);
+               Item::deleteById($deleted["id"]);
 
                logger('Deleted item with uri '.$item['uri'].' for user '.$item['uid']);
        }