feat: add channel for messages caught by AutoMod (#4986)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -603,6 +603,10 @@ void WindowManager::encodeChannel(IndirectChannel channel, QJsonObject &obj)
|
||||
obj.insert("name", channel.get()->getName());
|
||||
}
|
||||
break;
|
||||
case Channel::Type::TwitchAutomod: {
|
||||
obj.insert("type", "automod");
|
||||
}
|
||||
break;
|
||||
case Channel::Type::TwitchMentions: {
|
||||
obj.insert("type", "mentions");
|
||||
}
|
||||
@@ -676,6 +680,10 @@ IndirectChannel WindowManager::decodeChannel(const SplitDescriptor &descriptor)
|
||||
{
|
||||
return app->twitch->liveChannel;
|
||||
}
|
||||
else if (descriptor.type_ == "automod")
|
||||
{
|
||||
return app->twitch->automodChannel;
|
||||
}
|
||||
else if (descriptor.type_ == "irc")
|
||||
{
|
||||
return Irc::instance().getOrAddChannel(descriptor.server_,
|
||||
|
||||
@@ -29,6 +29,10 @@ LoggingChannel::LoggingChannel(const QString &_channelName,
|
||||
{
|
||||
this->subDirectory = "Live";
|
||||
}
|
||||
else if (channelName.startsWith("/automod"))
|
||||
{
|
||||
this->subDirectory = "AutoMod";
|
||||
}
|
||||
else
|
||||
{
|
||||
this->subDirectory =
|
||||
@@ -96,7 +100,8 @@ void LoggingChannel::addMessage(MessagePtr message)
|
||||
}
|
||||
|
||||
QString str;
|
||||
if (channelName.startsWith("/mentions"))
|
||||
if (channelName.startsWith("/mentions") ||
|
||||
channelName.startsWith("/automod"))
|
||||
{
|
||||
str.append("#" + message->channelName + " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user