feat: add initial experimental Twitch Eventsub support (#5837)

Co-authored-by: nerix <nerixdev@outlook.de>
This commit is contained in:
pajlada
2025-02-02 17:03:24 +01:00
committed by GitHub
parent f9f7d47b43
commit 0f8a29fdb9
130 changed files with 19656 additions and 8 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "twitch-eventsub-ws/string.hpp"
#include <boost/json.hpp>
#include <QString>
#include <string>
namespace chatterino::eventsub::lib {
boost::json::result_for<String, boost::json::value>::type tag_invoke(
boost::json::try_value_to_tag<String> /*tag*/,
const boost::json::value &jvRoot)
{
auto v = boost::json::try_value_to<std::string>(jvRoot);
if (v.has_error())
{
return v.error();
}
return String(std::move(v.value()));
}
} // namespace chatterino::eventsub::lib