Added custom FrankerFaceZ VIP badges (#2628)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł
2021-04-17 14:42:30 +02:00
committed by GitHub
parent 2f906c5504
commit ed7d1a88d0
8 changed files with 85 additions and 21 deletions
@@ -1128,6 +1128,18 @@ void TwitchMessageBuilder::appendTwitchBadges()
continue;
}
}
else if (badge.key_ == "vip")
{
if (auto customVipBadge = this->twitchChannel->ffzCustomVipBadge())
{
this->emplace<VipBadgeElement>(
customVipBadge.get(),
MessageElementFlag::BadgeChannelAuthority)
->setTooltip((*customVipBadge)->tooltip.string);
// early out, since we have to add a custom badge element here
continue;
}
}
else if (badge.flag_ == MessageElementFlag::BadgeSubscription)
{
auto badgeInfoIt = badgeInfos.find(badge.key_);