Skip to content

Commit

Permalink
fix(eventsub): compilation issues (#5212)
Browse files Browse the repository at this point in the history
* fix(eventsub): support all compilers and stuff

* fix: awaitable

* fix: qualify `value_to`

This is the run
  • Loading branch information
Nerixyz committed Mar 2, 2024
1 parent 38560ba commit 0e9c193
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ else()
add_subdirectory("${CMAKE_SOURCE_DIR}/lib/settings" EXCLUDE_FROM_ALL)
endif()

set(TWITCH_EVENTSUB_WS_LIBRARY_TYPE STATIC)
add_subdirectory("${CMAKE_SOURCE_DIR}/lib/twitch-eventsub-ws" EXCLUDE_FROM_ALL)

if (CHATTERINO_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion lib/twitch-eventsub-ws
5 changes: 0 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,6 @@ if (BUILD_APP)

target_link_libraries(${EXECUTABLE_PROJECT} PUBLIC ${LIBRARY_PROJECT})

target_link_libraries(${EXECUTABLE_PROJECT}
PUBLIC
twitch-eventsub-ws
)

set_target_directory_hierarchy(${EXECUTABLE_PROJECT})

if (WIN32)
Expand Down
4 changes: 3 additions & 1 deletion src/providers/twitch/EventSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,13 @@ void EventSub::start()
.toUtf8()
.toStdString();

auto [host, port, path] = getEventSubHost();
auto eventSubHost = getEventSubHost();

this->mainThread = std::make_unique<std::thread>([=] {
try
{
auto [host, port, path] = eventSubHost;

boost::asio::io_context ctx(1);

boost::asio::ssl::context sslContext{
Expand Down

0 comments on commit 0e9c193

Please sign in to comment.