Explorar o código

Update Inbox, fix tombstone bug

Daniel Supernault %!s(int64=4) %!d(string=hai) anos
pai
achega
929ff5eb01
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      app/Util/ActivityPub/Inbox.php

+ 3 - 3
app/Util/ActivityPub/Inbox.php

@@ -500,13 +500,13 @@ class Inbox
 							->orWhere('url', $id)
 							->orWhere('object_url', $id)
 							->first();
+						if(!$status) {
+							return;
+						}
 						Notification::whereActorId($profile->id)
 							->whereItemType('App\Status')
 							->whereItemId($status->id)
 							->forceDelete();
-						if(!$status) {
-							return;
-						}
 						$status->directMessage()->delete();
 						$status->media()->delete();
 						$status->likes()->delete();