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
This commit is contained in:
Rasmus Karlsson 2018-11-15 00:41:22 +01:00
parent d8fcc1a3ed
commit 90309d00ea

View file

@ -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<EmoteElement>(badge.get(),
MessageElementFlag::BadgeVanity)
->setTooltip((*badge)->tooltip.string);
continue;
}
}
}
}