Update StatusTagsPipeline, reject if type not set

This commit is contained in:
Daniel Supernault 2022-12-24 01:34:59 -07:00
parent 0d157baf1e
commit 91085c4566
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -47,7 +47,7 @@ class StatusTagsPipeline implements ShouldQueue
// Emoji
$tags->filter(function($tag) {
return $tag && $tag['type'] == 'Emoji' && isset($tag['id'], $tag['icon'], $tag['name']);
return $tag && isset($tag['id'], $tag['icon'], $tag['name'], $tag['type']) && $tag['type'] == 'Emoji';
})
->map(function($tag) {
CustomEmojiService::import($tag['id'], $this->status->id);