Merge pull request #6347 from pixelfed/staging

Staging
pull/6349/head
dansup 2 days ago committed by GitHub
commit 5efc09beea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -23,6 +23,7 @@ use App\Jobs\StoryPipeline\StoryFetch;
use App\Like; use App\Like;
use App\Media; use App\Media;
use App\Models\Conversation; use App\Models\Conversation;
use App\Models\PollVote;
use App\Models\RemoteReport; use App\Models\RemoteReport;
use App\Notification; use App\Notification;
use App\Profile; use App\Profile;
@ -30,8 +31,6 @@ use App\Services\AccountService;
use App\Services\FollowerService; use App\Services\FollowerService;
use App\Services\NotificationAppGatewayService; use App\Services\NotificationAppGatewayService;
use App\Services\PollService; use App\Services\PollService;
use App\Models\PollVote;
use App\User;
use App\Services\PushNotificationService; use App\Services\PushNotificationService;
use App\Services\ReblogService; use App\Services\ReblogService;
use App\Services\RelationshipService; use App\Services\RelationshipService;
@ -41,6 +40,7 @@ use App\Services\UserFilterService;
use App\Status; use App\Status;
use App\Story; use App\Story;
use App\StoryView; use App\StoryView;
use App\User;
use App\UserFilter; use App\UserFilter;
use App\Util\ActivityPub\Validator\Accept as AcceptValidator; use App\Util\ActivityPub\Validator\Accept as AcceptValidator;
use App\Util\ActivityPub\Validator\Announce as AnnounceValidator; use App\Util\ActivityPub\Validator\Announce as AnnounceValidator;
@ -918,12 +918,15 @@ class Inbox
->whereReblogOfId($status->id) ->whereReblogOfId($status->id)
->delete(); ->delete();
ReblogService::removePostReblog($profile->id, $status->id); ReblogService::removePostReblog($profile->id, $status->id);
Notification::whereProfileId($status->profile_id) $notifications = Notification::whereProfileId($status->profile_id)
->whereActorId($profile->id) ->whereActorId($profile->id)
->whereAction('share') ->whereAction('share')
->whereItemId($status->reblog_of_id) ->whereItemId($status->reblog_of_id)
->whereItemType('App\Status') ->whereItemType('App\Status')
->forceDelete(); ->get();
foreach ($notifications as $notification) {
$notification->forceDelete();
}
break; break;
case 'Block': case 'Block':
@ -943,12 +946,15 @@ class Inbox
FollowRequest::whereFollowingId($following->id) FollowRequest::whereFollowingId($following->id)
->whereFollowerId($profile->id) ->whereFollowerId($profile->id)
->forceDelete(); ->forceDelete();
Notification::whereProfileId($following->id) $notifications = Notification::whereProfileId($following->id)
->whereActorId($profile->id) ->whereActorId($profile->id)
->whereAction('follow') ->whereAction('follow')
->whereItemId($following->id) ->whereItemId($following->id)
->whereItemType('App\Profile') ->whereItemType('App\Profile')
->forceDelete(); ->get();
foreach ($notifications as $notification) {
$notification->forceDelete();
}
FollowerService::remove($profile->id, $following->id); FollowerService::remove($profile->id, $following->id);
RelationshipService::refresh($following->id, $profile->id); RelationshipService::refresh($following->id, $profile->id);
AccountService::del($profile->id); AccountService::del($profile->id);
@ -974,15 +980,18 @@ class Inbox
Like::whereProfileId($profile->id) Like::whereProfileId($profile->id)
->whereStatusId($status->id) ->whereStatusId($status->id)
->forceDelete(); ->forceDelete();
Notification::whereProfileId($status->profile_id) $notifications = Notification::whereProfileId($status->profile_id)
->whereActorId($profile->id) ->whereActorId($profile->id)
->whereAction('like') ->whereAction('like')
->whereItemId($status->id) ->whereItemId($status->id)
->whereItemType('App\Status') ->whereItemType('App\Status')
->forceDelete(); ->get();
foreach ($notifications as $notification) {
$notification->forceDelete();
}
break; break;
} }
} }
public function handleViewActivity() public function handleViewActivity()

Loading…
Cancel
Save