diff --git a/app/Jobs/StatusPipeline/StatusTagsPipeline.php b/app/Jobs/StatusPipeline/StatusTagsPipeline.php index a22bd11e9..bbc40b9be 100644 --- a/app/Jobs/StatusPipeline/StatusTagsPipeline.php +++ b/app/Jobs/StatusPipeline/StatusTagsPipeline.php @@ -45,11 +45,7 @@ class StatusTagsPipeline implements ShouldQueue return $tag && $tag['type'] == 'Emoji'; }) ->map(function($tag) { - CustomEmojiService::import($tag['id']); + CustomEmojiService::import($tag['id'], $this->status->id); }); - - // sleep(15); - - StatusService::del($this->status->id); } } diff --git a/app/Services/CustomEmojiService.php b/app/Services/CustomEmojiService.php index 75b1fb0ce..755415619 100644 --- a/app/Services/CustomEmojiService.php +++ b/app/Services/CustomEmojiService.php @@ -18,7 +18,7 @@ class CustomEmojiService return CustomEmoji::whereShortcode($shortcode)->first(); } - public static function import($url) + public static function import($url, $id = false) { if(config('federation.custom_emoji.enabled') == false) { return; @@ -72,6 +72,10 @@ class CustomEmojiService $name = str_replace(':', '', $json['name']); Cache::forget('pf:custom_emoji:' . $name); + + if($id) { + StatusService::del($id); + } return; } else { return;