Harden emote parsing (#3885)

This commit is contained in:
pajlada
2022-11-05 11:04:35 +01:00
committed by GitHub
parent f00f766eeb
commit aac9ea53d0
14 changed files with 1163 additions and 104 deletions
+13 -3
View File
@@ -33,13 +33,23 @@ struct CheerEmoteSet {
std::vector<CheerEmote> cheerEmotes;
};
class TwitchEmotes
class ITwitchEmotes
{
public:
virtual ~ITwitchEmotes() = default;
virtual EmotePtr getOrCreateEmote(const EmoteId &id,
const EmoteName &name) = 0;
};
class TwitchEmotes : public ITwitchEmotes
{
public:
static QString cleanUpEmoteCode(const QString &dirtyEmoteCode);
TwitchEmotes();
TwitchEmotes() = default;
EmotePtr getOrCreateEmote(const EmoteId &id, const EmoteName &name);
EmotePtr getOrCreateEmote(const EmoteId &id,
const EmoteName &name) override;
private:
Url getEmoteLink(const EmoteId &id, const QString &emoteScale);