Added trashcan, replaced messageID var with this-message().id, removed pubsub stuff that didn't belong

This commit is contained in:
apa420
2019-04-28 02:25:05 +02:00
parent 4f79d6fc07
commit 3c1d264689
10 changed files with 13 additions and 18 deletions
-3
View File
@@ -710,9 +710,6 @@ PubSub::PubSub()
// qDebug() << QString::fromStdString(rj::stringify(data));
};
this->moderationActionHandlers["delete"] =
[this](const auto &data, const auto &roomID) { qDebug() << "xd"; };
this->websocketClient.set_access_channels(websocketpp::log::alevel::all);
this->websocketClient.clear_access_channels(
websocketpp::log::alevel::frame_payload);
@@ -580,9 +580,8 @@ void TwitchMessageBuilder::parseMessageID()
if (iterator != this->tags.end())
{
this->messageID = iterator.value().toString();
this->message().id = iterator.value().toString();
}
this->message().id = this->messageID;
}
void TwitchMessageBuilder::parseRoomID()
@@ -608,7 +607,7 @@ void TwitchMessageBuilder::parseRoomID()
void TwitchMessageBuilder::appendChannelName()
{
QString channelName("#" + this->channel->getName());
Link link(Link::Url, this->channel->getName() + "\n" + this->messageID);
Link link(Link::Url, this->channel->getName() + "\n" + this->message().id);
this->emplace<TextElement>(channelName, MessageElementFlag::ChannelName,
MessageColor::System) //
@@ -41,7 +41,6 @@ public:
MessageParseArgs args;
const QVariantMap tags;
QString messageID;
QString userName;
bool isIgnored() const;
@@ -55,8 +54,10 @@ private:
void appendUsername();
void parseHighlights(bool isPastMsg);
void appendTwitchEmote(const QString &emote,
std::vector<std::tuple<int, EmotePtr, EmoteName>> &vec, std::vector<int> &correctPositions);
void appendTwitchEmote(
const QString &emote,
std::vector<std::tuple<int, EmotePtr, EmoteName>> &vec,
std::vector<int> &correctPositions);
Outcome tryAppendEmote(const EmoteName &name);
void addWords(