feat(eventsub): handle unban requests (#6086)
This commit is contained in:
@@ -315,11 +315,11 @@ struct UnbanRequest {
|
||||
|
||||
bool isApproved;
|
||||
|
||||
std::string userID;
|
||||
std::string userLogin;
|
||||
std::string userName;
|
||||
String userID;
|
||||
String userLogin;
|
||||
String userName;
|
||||
|
||||
std::string moderatorMessage;
|
||||
String moderatorMessage;
|
||||
};
|
||||
|
||||
struct ApproveUnbanRequest : public UnbanRequest {
|
||||
|
||||
@@ -1013,7 +1013,7 @@ boost::json::result_for<UnbanRequest, 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())
|
||||
{
|
||||
@@ -1026,7 +1026,7 @@ boost::json::result_for<UnbanRequest, 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())
|
||||
{
|
||||
@@ -1039,7 +1039,7 @@ boost::json::result_for<UnbanRequest, 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())
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ boost::json::result_for<UnbanRequest, boost::json::value>::type tag_invoke(
|
||||
}
|
||||
|
||||
auto moderatorMessage =
|
||||
boost::json::try_value_to<std::string>(*jvmoderatorMessage);
|
||||
boost::json::try_value_to<String>(*jvmoderatorMessage);
|
||||
|
||||
if (moderatorMessage.has_error())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user