From 90309d00eadf605a32eb6b1c04a9007171204ac2 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Thu, 15 Nov 2018 00:41:22 +0100 Subject: [PATCH] attempt to load global badges if no channel badge fits Progress on #875 - Badges now render properly. this should also fix some other global badges not rendering --- src/providers/twitch/TwitchMessageBuilder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index cdf41093f..10ca6ba12 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -1195,6 +1195,14 @@ void TwitchMessageBuilder::appendTwitchBadges() ->setTooltip((*badgeEmote)->tooltip.string); continue; } + if (auto badge = this->twitchChannel->globalTwitchBadges().badge( + splits[0], splits[1])) + { + this->emplace(badge.get(), + MessageElementFlag::BadgeVanity) + ->setTooltip((*badge)->tooltip.string); + continue; + } } } }