From b313d2cf719e67499c7ea099f4e1e621f01216f3 Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 8 Aug 2026 14:46:33 -0400 Subject: [PATCH] fix(comments): render custom channel emojis in comments and descriptions (closes #5888) --- src/invidious/comments/content.cr | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/invidious/comments/content.cr b/src/invidious/comments/content.cr index 1f55bfe6..ed550afe 100644 --- a/src/invidious/comments/content.cr +++ b/src/invidious/comments/content.cr @@ -63,22 +63,20 @@ def content_to_comment_html(content, video_id : String? = "") # check for custom emojis if run["emoji"]? - if run["emoji"]["isCustomEmoji"]?.try &.as_bool - if emoji_image = run.dig?("emoji", "image") - emoji_alt = emoji_image.dig?("accessibility", "accessibilityData", "label").try &.as_s || text - emoji_thumb = emoji_image["thumbnails"][0] - text = String.build do |str| - str << %() << emoji_alt << ) - end - else - # Hide deleted channel emoji - text = "" + if emoji_image = run.dig?("emoji", "image") + emoji_alt = emoji_image.dig?("accessibility", "accessibilityData", "label").try &.as_s || text + emoji_thumb = emoji_image["thumbnails"][0] + text = String.build do |str| + str << %() << emoji_alt << ) end + else + # Hide deleted channel emoji + text = "" end end