Added support for Twitch's Chat Replies (#3722)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel Sage
2022-07-31 06:45:25 -04:00
committed by GitHub
parent a280089693
commit 20c974fdab
53 changed files with 2022 additions and 310 deletions
@@ -3,6 +3,10 @@
#include <IrcMessage>
#include "common/Channel.hpp"
#include "messages/Message.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
#include <vector>
namespace chatterino {
@@ -20,6 +24,10 @@ public:
std::vector<MessagePtr> parseMessage(Channel *channel,
Communi::IrcMessage *message);
std::vector<MessagePtr> parseMessageWithReply(
Channel *channel, Communi::IrcMessage *message,
const std::vector<MessagePtr> &otherLoaded);
// parsePrivMessage arses a single IRC PRIVMSG into 0-1 Chatterino messages
std::vector<MessagePtr> parsePrivMessage(
Channel *channel, Communi::IrcPrivateMessage *message);
@@ -59,6 +67,10 @@ private:
void addMessage(Communi::IrcMessage *message, const QString &target,
const QString &content, TwitchIrcServer &server,
bool isResub, bool isAction);
void populateReply(TwitchChannel *channel, Communi::IrcMessage *message,
const std::vector<MessagePtr> &otherLoaded,
TwitchMessageBuilder &builder);
};
} // namespace chatterino