feat: Add Live Emote Updates for BTTV (#4147)
This feature is enabled by default and can be disabled in settings with the "Enable BTTV live emotes updates" setting. Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
#include "providers/bttv/BttvLiveUpdates.hpp"
|
||||
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
|
||||
#include "providers/seventv/SeventvEventAPI.hpp"
|
||||
#include "providers/twitch/api/Helix.hpp"
|
||||
@@ -30,6 +31,7 @@ using namespace std::chrono_literals;
|
||||
|
||||
namespace {
|
||||
|
||||
const QString BTTV_LIVE_UPDATES_URL = "wss://sockets.betterttv.net/ws";
|
||||
const QString SEVENTV_EVENTAPI_URL = "wss://events.7tv.io/v3";
|
||||
|
||||
} // namespace
|
||||
@@ -45,6 +47,14 @@ TwitchIrcServer::TwitchIrcServer()
|
||||
this->initializeIrc();
|
||||
|
||||
this->pubsub = new PubSub(TWITCH_PUBSUB_URL);
|
||||
|
||||
if (getSettings()->enableBTTVLiveUpdates &&
|
||||
getSettings()->enableBTTVChannelEmotes)
|
||||
{
|
||||
this->bttvLiveUpdates =
|
||||
std::make_unique<BttvLiveUpdates>(BTTV_LIVE_UPDATES_URL);
|
||||
}
|
||||
|
||||
if (getSettings()->enableSevenTVEventAPI &&
|
||||
getSettings()->enableSevenTVChannelEmotes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user