@@ -282,8 +282,8 @@ public function handleNoteCreate()
282
282
}
283
283
284
284
if ($ actor ->followers_count == 0 ) {
285
- if (config ('federation.activitypub.ingest.store_notes_without_followers ' )) {
286
- } else if (FollowerService::followerCount ($ actor ->id , true ) == 0 ) {
285
+ if (config ('federation.activitypub.ingest.store_notes_without_followers ' )) {
286
+ } else if (FollowerService::followerCount ($ actor ->id , true ) == 0 ) {
287
287
return ;
288
288
}
289
289
}
@@ -401,6 +401,8 @@ public function handleDirectMessage()
401
401
$ status ->visibility = 'direct ' ;
402
402
$ status ->scope = 'direct ' ;
403
403
$ status ->url = $ activity ['id ' ];
404
+ $ status ->uri = $ activity ['id ' ];
405
+ $ status ->object_url = $ activity ['id ' ];
404
406
$ status ->in_reply_to_profile_id = $ profile ->id ;
405
407
$ status ->save ();
406
408
@@ -703,12 +705,17 @@ public function handleDeleteActivity()
703
705
return ;
704
706
}
705
707
$ status = Status::whereProfileId ($ profile ->id )
706
- ->whereObjectUrl ($ id )
708
+ ->where (function ($ q ) use ($ id ) {
709
+ return $ q ->where ('object_url ' , $ id )
710
+ ->orWhere ('url ' , $ id );
711
+ })
707
712
->first ();
708
713
if (!$ status ) {
709
714
return ;
710
715
}
711
- FeedRemoveRemotePipeline::dispatch ($ status ->id , $ status ->profile_id )->onQueue ('feed ' );
716
+ if ($ status ->scope && $ status ->scope != 'direct ' ) {
717
+ FeedRemoveRemotePipeline::dispatch ($ status ->id , $ status ->profile_id )->onQueue ('feed ' );
718
+ }
712
719
RemoteStatusDelete::dispatch ($ status )->onQueue ('high ' );
713
720
return ;
714
721
break ;
0 commit comments