From d2b90748525ed8af3385477b120d56e5b9ab78bd Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 26 Nov 2023 13:00:04 +0100 Subject: [PATCH] Fix build for Twitch mock --- src/macro-external/twitch/chat-connection.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/macro-external/twitch/chat-connection.cpp b/src/macro-external/twitch/chat-connection.cpp index ae58c2e5..d6571c4d 100644 --- a/src/macro-external/twitch/chat-connection.cpp +++ b/src/macro-external/twitch/chat-connection.cpp @@ -432,8 +432,8 @@ void TwitchChatConnection::ConnectThread() _client.reset(); _connected = true; websocketpp::lib::error_code ec; - EventSubWSClient::connection_ptr con = - _client.get_connection(_url, ec); + websocketpp::client:: + connection_ptr con = _client.get_connection(_url, ec); if (ec) { blog(LOG_INFO, "Twitch TwitchChatConnection failed: %s", ec.message().c_str()); @@ -634,8 +634,10 @@ void TwitchChatConnection::OnOpen(connection_hdl) Authenticate(); } -void TwitchChatConnection::OnMessage(connection_hdl, - EventSubWSClient::message_ptr message) +void TwitchChatConnection::OnMessage( + connection_hdl, + websocketpp::client::message_ptr + message) { constexpr std::string_view authOKCommand = "001"; constexpr std::string_view pingCommand = "PING"; @@ -679,7 +681,8 @@ void TwitchChatConnection::OnMessage(connection_hdl, void TwitchChatConnection::OnClose(connection_hdl hdl) { - EventSubWSClient::connection_ptr con = _client.get_con_from_hdl(hdl); + websocketpp::client::connection_ptr + con = _client.get_con_from_hdl(hdl); auto msg = con->get_ec().message(); blog(LOG_INFO, "Twitch chat connection closed: %s", msg.c_str()); _connected = false; @@ -687,7 +690,8 @@ void TwitchChatConnection::OnClose(connection_hdl hdl) void TwitchChatConnection::OnFail(connection_hdl hdl) { - EventSubWSClient::connection_ptr con = _client.get_con_from_hdl(hdl); + websocketpp::client::connection_ptr + con = _client.get_con_from_hdl(hdl); auto msg = con->get_ec().message(); blog(LOG_INFO, "Twitch chat connection failed: %s", msg.c_str()); _connected = false;