fix(eventsub): compilation issues (#5212)

* fix(eventsub): support all compilers and stuff

* fix: awaitable

* fix: qualify `value_to`

This is the run
This commit is contained in:
nerix 2024-03-02 22:01:13 +01:00 committed by GitHub
parent 38560ba666
commit 0e9c193ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 7 deletions

View file

@ -209,6 +209,7 @@ else()
add_subdirectory("${CMAKE_SOURCE_DIR}/lib/settings" EXCLUDE_FROM_ALL) add_subdirectory("${CMAKE_SOURCE_DIR}/lib/settings" EXCLUDE_FROM_ALL)
endif() endif()
set(TWITCH_EVENTSUB_WS_LIBRARY_TYPE STATIC)
add_subdirectory("${CMAKE_SOURCE_DIR}/lib/twitch-eventsub-ws" EXCLUDE_FROM_ALL) add_subdirectory("${CMAKE_SOURCE_DIR}/lib/twitch-eventsub-ws" EXCLUDE_FROM_ALL)
if (CHATTERINO_PLUGINS) if (CHATTERINO_PLUGINS)

@ -1 +1 @@
Subproject commit dca1597753a751b5c4c886b27c6fb699061d4419 Subproject commit 12f831efefda61a36f0cd68e6eba74302ea4e6f1

View file

@ -834,11 +834,6 @@ if (BUILD_APP)
target_link_libraries(${EXECUTABLE_PROJECT} PUBLIC ${LIBRARY_PROJECT}) target_link_libraries(${EXECUTABLE_PROJECT} PUBLIC ${LIBRARY_PROJECT})
target_link_libraries(${EXECUTABLE_PROJECT}
PUBLIC
twitch-eventsub-ws
)
set_target_directory_hierarchy(${EXECUTABLE_PROJECT}) set_target_directory_hierarchy(${EXECUTABLE_PROJECT})
if (WIN32) if (WIN32)

View file

@ -266,11 +266,13 @@ void EventSub::start()
.toUtf8() .toUtf8()
.toStdString(); .toStdString();
auto [host, port, path] = getEventSubHost(); auto eventSubHost = getEventSubHost();
this->mainThread = std::make_unique<std::thread>([=] { this->mainThread = std::make_unique<std::thread>([=] {
try try
{ {
auto [host, port, path] = eventSubHost;
boost::asio::io_context ctx(1); boost::asio::io_context ctx(1);
boost::asio::ssl::context sslContext{ boost::asio::ssl::context sslContext{