Fix rerun flag not being unset after stream finishes (#5237)
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace chatterino::commands {
|
||||
|
||||
QString follow(const CommandContext &ctx)
|
||||
@@ -569,6 +571,27 @@ QString injectFakeMessage(const CommandContext &ctx)
|
||||
return "";
|
||||
}
|
||||
|
||||
QString injectStreamUpdateNoStream(const CommandContext &ctx)
|
||||
{
|
||||
/**
|
||||
* /debug-update-to-no-stream makes the current channel mimic going offline
|
||||
*/
|
||||
if (ctx.channel == nullptr)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (ctx.twitchChannel == nullptr)
|
||||
{
|
||||
ctx.channel->addMessage(
|
||||
makeSystemMessage("The /debug-update-to-no-stream command only "
|
||||
"works in Twitch channels"));
|
||||
return "";
|
||||
}
|
||||
|
||||
ctx.twitchChannel->updateStreamStatus(std::nullopt);
|
||||
return "";
|
||||
}
|
||||
|
||||
QString copyToClipboard(const CommandContext &ctx)
|
||||
{
|
||||
if (ctx.channel == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user