Cleaned some stuff up and did some things

This commit is contained in:
apa420
2018-08-12 21:05:12 +02:00
parent 320558ee63
commit 93bbe33664
6 changed files with 13 additions and 47 deletions
+4 -6
View File
@@ -352,8 +352,7 @@ void TwitchChannel::refreshLiveStatus()
QString url("https://api.twitch.tv/kraken/streams/" + roomID);
//<<<<<<< HEAD
// auto request = makeGetStreamRequest(roomID,
// QThread::currentThread());
// auto request = makeGetStreamRequest(roomID, QThread::currentThread());
//=======
auto request = NetworkRequest::twitchRequest(url);
request.setCaller(QThread::currentThread());
@@ -400,8 +399,7 @@ Outcome TwitchChannel::parseLiveStatus(const rapidjson::Document &document)
const rapidjson::Value &streamChannel = stream["channel"];
if (!streamChannel.IsObject() || !streamChannel.HasMember("status")) {
Log("[TwitchChannel:refreshLiveStatus] Missing member \"status\" "
"in "
Log("[TwitchChannel:refreshLiveStatus] Missing member \"status\" in "
"channel");
return Failure;
}
@@ -475,8 +473,8 @@ Outcome TwitchChannel::parseRecentMessages(const QJsonObject &jsonRoot)
for (const auto jsonMessage : jsonMessages) {
auto content = jsonMessage.toString().toUtf8();
// passing nullptr as the channel makes the message invalid but we
// don't check for that anyways
// passing nullptr as the channel makes the message invalid but we don't
// check for that anyways
auto message = Communi::IrcMessage::fromData(content, nullptr);
auto privMsg = dynamic_cast<Communi::IrcPrivateMessage *>(message);
assert(privMsg);