Refactored and Migrated to Helix AutoMod message management (#2779)

This uses new Helix endpoint which requires new scopes and users need to reauthenticate to approve/deny AutoMod messages again.
This commit is contained in:
Paweł
2021-05-14 13:14:43 +02:00
committed by GitHub
parent 170529e778
commit e746201c4f
7 changed files with 179 additions and 43 deletions
+14
View File
@@ -205,6 +205,14 @@ enum class HelixStreamMarkerError {
UserNotAuthenticated,
};
enum class HelixAutoModMessageError {
Unknown,
MessageAlreadyProcessed,
UserNotAuthenticated,
UserNotAuthorized,
MessageNotFound,
};
class Helix final : boost::noncopyable
{
public:
@@ -307,6 +315,12 @@ public:
std::function<void(NetworkResult)> successCallback,
HelixFailureCallback failureCallback);
// https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
void manageAutoModMessages(
QString userID, QString msgID, QString action,
std::function<void()> successCallback,
std::function<void(HelixAutoModMessageError)> failureCallback);
void update(QString clientId, QString oauthToken);
static void initialize();