refactor: merge emote element flags (#6511)

This commit is contained in:
nerix
2025-09-30 19:07:25 +02:00
committed by GitHub
parent f6a820cff0
commit 3f05edc071
35 changed files with 131 additions and 174 deletions
@@ -116,25 +116,21 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
auto it = accemotes->find({words[i]});
if (it != accemotes->end())
{
b.emplace<EmoteElement>(it->second,
MessageElementFlag::TwitchEmote);
b.emplace<EmoteElement>(it->second, MessageElementFlag::Emote);
continue;
}
} // Twitch emote
{ // bttv/ffz emote
if ((emote = bttvemotes->emote({words[i]})))
emote = bttvemotes->emote({words[i]});
if (!emote)
{
flags = MessageElementFlag::BttvEmote;
}
else if ((emote = ffzemotes->emote({words[i]})))
{
flags = MessageElementFlag::FfzEmote;
emote = ffzemotes->emote({words[i]});
}
// TODO: Load 7tv global emotes
if (emote)
{
b.emplace<EmoteElement>(*emote, flags);
b.emplace<EmoteElement>(*emote, MessageElementFlag::Emote);
continue;
}
} // bttv/ffz emote