feat: add initial experimental Twitch Eventsub support (#5837)
Co-authored-by: nerix <nerixdev@outlook.de>
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user