2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2017-06-11 09:31:45 +02:00
|
|
|
#include "channel.hpp"
|
|
|
|
#include "messages/messagebuilder.hpp"
|
2017-04-12 17:46:44 +02:00
|
|
|
|
|
|
|
#include <QString>
|
2017-06-13 21:13:58 +02:00
|
|
|
#include <QVariant>
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
class Resources;
|
|
|
|
class EmoteManager;
|
|
|
|
class WindowManager;
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace twitch {
|
2017-04-12 17:46:44 +02:00
|
|
|
|
|
|
|
class TwitchMessageBuilder : public messages::MessageBuilder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TwitchMessageBuilder();
|
|
|
|
|
|
|
|
QString messageId;
|
|
|
|
QString userName;
|
|
|
|
|
|
|
|
static messages::SharedMessage parse(const Communi::IrcPrivateMessage *ircMessage,
|
2017-06-13 21:13:58 +02:00
|
|
|
Channel *channel, const messages::MessageParseArgs &args,
|
|
|
|
const Resources &resources, EmoteManager &emoteManager,
|
|
|
|
WindowManager &windowManager);
|
2017-04-12 17:46:44 +02:00
|
|
|
|
|
|
|
// static bool sortTwitchEmotes(
|
|
|
|
// const std::pair<long int, messages::LazyLoadedImage *> &a,
|
|
|
|
// const std::pair<long int, messages::LazyLoadedImage *> &b);
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void appendModerationWords(const Communi::IrcPrivateMessage *ircMessage,
|
|
|
|
const Resources &resources);
|
|
|
|
void appendTwitchEmote(const Communi::IrcPrivateMessage *ircMessage, const QString &emote,
|
|
|
|
std::vector<std::pair<long int, messages::LazyLoadedImage *>> &vec,
|
|
|
|
EmoteManager &emoteManager);
|
|
|
|
void appendTwitchBadges(const QStringList &badges, const Resources &resources,
|
|
|
|
EmoteManager &emoteManager);
|
2017-04-12 17:46:44 +02:00
|
|
|
};
|
2017-06-07 10:09:24 +02:00
|
|
|
|
|
|
|
} // namespace twitch
|
|
|
|
} // namespace chatterino
|