diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index 7df311129..0ce630137 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -96,8 +96,10 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url) if (is_array($emojis_array) && count($emojis_array)) { foreach ($emojis_array as $emoji) { - $return['texts'][] = ':' . $emoji['shortcode'] . ':'; - $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) { + $return['texts'][] = ':' . $emoji['shortcode'] . ':'; + $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + } } } }