improving TwitchChannel

This commit is contained in:
fourtf
2018-07-14 14:24:18 +02:00
parent a720c76dc0
commit 111853c574
16 changed files with 752 additions and 674 deletions
+4 -5
View File
@@ -85,18 +85,17 @@ void IrcMessageHandler::handleRoomStateMessage(Communi::IrcMessage *message)
return;
}
auto chan = app->twitch.server->getChannelOrEmpty(chanName);
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(chan.get());
if (twitchChannel) {
if (auto *twitchChannel = dynamic_cast<TwitchChannel *>(chan.get())) {
// room-id
decltype(tags.find("xD")) it;
if ((it = tags.find("room-id")) != tags.end()) {
auto roomID = it.value().toString();
auto roomId = it.value().toString();
twitchChannel->setRoomID(roomID);
twitchChannel->setRoomID(roomId);
app->resources->loadChannelData(roomID);
app->resources->loadChannelData(roomId);
}
// Room modes