|
@@ -61,16 +61,12 @@ class StatusDelete implements ShouldQueue
|
|
$status = $this->status;
|
|
$status = $this->status;
|
|
$profile = $this->status->profile;
|
|
$profile = $this->status->profile;
|
|
|
|
|
|
- StatusService::del($status->id);
|
|
|
|
- $count = $profile->statuses()
|
|
|
|
- ->getQuery()
|
|
|
|
- ->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
|
|
|
|
- ->whereNull('in_reply_to_id')
|
|
|
|
- ->whereNull('reblog_of_id')
|
|
|
|
- ->count();
|
|
|
|
-
|
|
|
|
- $profile->status_count = ($count - 1);
|
|
|
|
- $profile->save();
|
|
|
|
|
|
+ StatusService::del($status->id, true);
|
|
|
|
+
|
|
|
|
+ if(in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) {
|
|
|
|
+ $profile->status_count = $profile->status_count - 1;
|
|
|
|
+ $profile->save();
|
|
|
|
+ }
|
|
|
|
|
|
if(config_cache('federation.activitypub.enabled') == true) {
|
|
if(config_cache('federation.activitypub.enabled') == true) {
|
|
$this->fanoutDelete($status);
|
|
$this->fanoutDelete($status);
|