hardcoded list of BTTV's christmas emotes

This commit is contained in:
Rasmus Karlsson
2019-12-05 20:10:56 -08:00
parent bcc53c9aa7
commit 2d3fb8950e
3 changed files with 28 additions and 3 deletions
@@ -28,6 +28,10 @@
namespace {
const QStringList zeroWidthEmotes{
"SoSnowy", "IceCold", "SantaHat", "TopHat", "ReinDeer", "CandyCane",
};
QColor getRandomColor(const QVariant &userId)
{
static const std::vector<QColor> twitchUsernameColors = {
@@ -1162,6 +1166,11 @@ Outcome TwitchMessageBuilder::tryAppendEmote(const EmoteName &name)
else if ((emote = globalBttvEmotes.emote(name)))
{
flags = MessageElementFlag::BttvEmote;
if (zeroWidthEmotes.contains(name.string))
{
flags.set(MessageElementFlag::ZeroWidthEmote);
}
}
if (emote)