feat(eventsub): Add support for /(un)raid (#6002)
This commit is contained in:
@@ -231,9 +231,9 @@ struct SharedChatUntimeout : public Untimeout {
|
||||
struct Raid {
|
||||
static constexpr std::string_view TAG = "raid";
|
||||
|
||||
std::string userID;
|
||||
std::string userLogin;
|
||||
std::string userName;
|
||||
String userID;
|
||||
String userLogin;
|
||||
String userName;
|
||||
|
||||
int viewerCount;
|
||||
};
|
||||
@@ -245,9 +245,9 @@ struct Raid {
|
||||
struct Unraid {
|
||||
static constexpr std::string_view TAG = "unraid";
|
||||
|
||||
std::string userID;
|
||||
std::string userLogin;
|
||||
std::string userName;
|
||||
String userID;
|
||||
String userLogin;
|
||||
String userName;
|
||||
};
|
||||
|
||||
/* message deleted
|
||||
|
||||
@@ -647,7 +647,7 @@ boost::json::result_for<Raid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userID = boost::json::try_value_to<std::string>(*jvuserID);
|
||||
auto userID = boost::json::try_value_to<String>(*jvuserID);
|
||||
|
||||
if (userID.has_error())
|
||||
{
|
||||
@@ -660,7 +660,7 @@ boost::json::result_for<Raid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userLogin = boost::json::try_value_to<std::string>(*jvuserLogin);
|
||||
auto userLogin = boost::json::try_value_to<String>(*jvuserLogin);
|
||||
|
||||
if (userLogin.has_error())
|
||||
{
|
||||
@@ -673,7 +673,7 @@ boost::json::result_for<Raid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userName = boost::json::try_value_to<std::string>(*jvuserName);
|
||||
auto userName = boost::json::try_value_to<String>(*jvuserName);
|
||||
|
||||
if (userName.has_error())
|
||||
{
|
||||
@@ -719,7 +719,7 @@ boost::json::result_for<Unraid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userID = boost::json::try_value_to<std::string>(*jvuserID);
|
||||
auto userID = boost::json::try_value_to<String>(*jvuserID);
|
||||
|
||||
if (userID.has_error())
|
||||
{
|
||||
@@ -732,7 +732,7 @@ boost::json::result_for<Unraid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userLogin = boost::json::try_value_to<std::string>(*jvuserLogin);
|
||||
auto userLogin = boost::json::try_value_to<String>(*jvuserLogin);
|
||||
|
||||
if (userLogin.has_error())
|
||||
{
|
||||
@@ -745,7 +745,7 @@ boost::json::result_for<Unraid, boost::json::value>::type tag_invoke(
|
||||
EVENTSUB_BAIL_HERE(error::Kind::FieldMissing);
|
||||
}
|
||||
|
||||
auto userName = boost::json::try_value_to<std::string>(*jvuserName);
|
||||
auto userName = boost::json::try_value_to<String>(*jvuserName);
|
||||
|
||||
if (userName.has_error())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user