feat(eventsub): implement untimeout (#6028)

This commit is contained in:
nerix
2025-03-04 23:00:45 +01:00
committed by GitHub
parent 3dc73e9b84
commit 4b48320eef
7 changed files with 383 additions and 7 deletions
@@ -215,9 +215,9 @@ struct SharedChatTimeout : public Timeout {
struct Untimeout {
static constexpr std::string_view TAG = "untimeout";
std::string userID;
std::string userLogin;
std::string userName;
String userID;
String userLogin;
String userName;
};
struct SharedChatUntimeout : public Untimeout {
static constexpr std::string_view TAG = "shared_chat_untimeout";
@@ -578,7 +578,7 @@ boost::json::result_for<Untimeout, 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())
{
@@ -591,7 +591,7 @@ boost::json::result_for<Untimeout, 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())
{
@@ -604,7 +604,7 @@ boost::json::result_for<Untimeout, 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())
{