From 5245cfacd1ce2a5b9a9c90b2dd194075695a2ba8 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 2 Jul 2017 15:12:00 +0200 Subject: [PATCH] Store channel room ID as a string instead of an int --- src/channel.cpp | 5 ----- src/channel.hpp | 4 ++-- src/twitch/twitchmessagebuilder.cpp | 4 ++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/channel.cpp b/src/channel.cpp index 4bf0e2afe..c3a184003 100644 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -64,11 +64,6 @@ const QString &Channel::getName() const return _name; } -int Channel::getRoomID() const -{ - return _roomID; -} - const QString &Channel::getSubLink() const { return _subLink; diff --git a/src/channel.hpp b/src/channel.hpp index 3f1f28b4d..35b3ecb31 100644 --- a/src/channel.hpp +++ b/src/channel.hpp @@ -37,7 +37,6 @@ public: bool isEmpty() const; const QString &getName() const; - int getRoomID() const; const QString &getSubLink() const; const QString &getChannelLink() const; const QString &getPopoutPlayerLink() const; @@ -53,6 +52,8 @@ public: void sendMessage(const QString &message); + std::string roomID; + private: WindowManager &windowManager; EmoteManager &emoteManager; @@ -62,7 +63,6 @@ private: messages::LimitedQueue _messages; QString _name; - int _roomID; ConcurrentMap _bttvChannelEmotes; ConcurrentMap _ffzChannelEmotes; diff --git a/src/twitch/twitchmessagebuilder.cpp b/src/twitch/twitchmessagebuilder.cpp index 2074ca00b..b1d476f89 100644 --- a/src/twitch/twitchmessagebuilder.cpp +++ b/src/twitch/twitchmessagebuilder.cpp @@ -50,6 +50,10 @@ SharedMessage TwitchMessageBuilder::parse(const Communi::IrcPrivateMessage *ircM std::string roomID; if (iterator != std::end(tags)) { roomID = iterator.value().toString().toStdString(); + + if (channel->roomID.empty()) { + channel->roomID = roomID; + } } // timestamps