Migrate /emoteonly and /emoteonlyoff commands to the Helix API (#4015)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QString>
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
|
||||
using namespace chatterino;
|
||||
using ::testing::Exactly;
|
||||
@@ -281,8 +282,71 @@ public:
|
||||
(FailureCallback<HelixStartRaidError, QString> failureCallback)),
|
||||
(override)); // /raid
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateEmoteMode,
|
||||
(QString broadcasterID, QString moderatorID, bool emoteMode,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateFollowerMode,
|
||||
(QString broadcasterID, QString moderatorID,
|
||||
boost::optional<int> followerModeDuration,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateNonModeratorChatDelay,
|
||||
(QString broadcasterID, QString moderatorID,
|
||||
boost::optional<int> nonModeratorChatDelayDuration,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateSlowMode,
|
||||
(QString broadcasterID, QString moderatorID,
|
||||
boost::optional<int> slowModeWaitTime,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateSubscriberMode,
|
||||
(QString broadcasterID, QString moderatorID,
|
||||
bool subscriberMode,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateUniqueChatMode,
|
||||
(QString broadcasterID, QString moderatorID,
|
||||
bool uniqueChatMode,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
// update chat settings
|
||||
|
||||
MOCK_METHOD(void, update, (QString clientId, QString oauthToken),
|
||||
(override));
|
||||
|
||||
protected:
|
||||
// The extra parenthesis around the failure callback is because its type contains a comma
|
||||
MOCK_METHOD(void, updateChatSettings,
|
||||
(QString broadcasterID, QString moderatorID, QJsonObject json,
|
||||
ResultCallback<HelixChatSettings> successCallback,
|
||||
(FailureCallback<HelixUpdateChatSettingsError, QString>
|
||||
failureCallback)),
|
||||
(override));
|
||||
};
|
||||
|
||||
static QString DEFAULT_SETTINGS = R"!(
|
||||
|
||||
Reference in New Issue
Block a user