fix: disable correct message upon automod approve or deny (#5611)

This commit is contained in:
iProdigy 2024-10-05 11:35:33 +00:00 committed by GitHub
parent 94e266ac82
commit 2d7f515e5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -52,6 +52,7 @@
- Bugfix: Fixed log files being locked longer than needed. (#5592)
- Bugfix: Fixed global badges not showing in anonymous mode. (#5599)
- Bugfix: Fixed grammar in the user highlight page. (#5602)
- Bugfix: Fixed incorrect message being disabled in some cases upon approving or denying an automod caught message. (#5611)
- Bugfix: Fixed double-click selection not working when clicking outside a message. (#5617)
- Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420)
- Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422)

View file

@ -1835,6 +1835,7 @@ std::pair<MessagePtr, MessagePtr> MessageBuilder::makeAutomodMessage(
//
// Builder for AutoMod message with explanation
builder.message().id = "automod_" + action.msgID;
builder.message().loginName = "automod";
builder.message().channelName = channelName;
builder.message().flags.set(MessageFlag::PubSub);

View file

@ -580,8 +580,12 @@ void TwitchIrcServer::initialize()
}
});
}
// "ALLOWED" and "DENIED" statuses remain unimplemented
// They are versions of automod_message_(denied|approved) but for mods.
else
{
// Gray out approve/deny button upon "ALLOWED" and "DENIED" statuses
// They are versions of automod_message_(denied|approved) but for mods.
chan->deleteMessage("automod_" + msg.messageID);
}
}
break;
@ -629,7 +633,6 @@ void TwitchIrcServer::initialize()
postToThread([chan, msg] {
chan->addMessage(msg, MessageContext::Original);
});
chan->deleteMessage(msg->id);
});
this->connections_.managedConnect(