feat: indicate which mods start and cancel raids (#5563)
This commit is contained in:
@@ -880,6 +880,40 @@ MessageBuilder::MessageBuilder(const WarnAction &action)
|
||||
this->message().searchText = text;
|
||||
}
|
||||
|
||||
MessageBuilder::MessageBuilder(const RaidAction &action)
|
||||
: MessageBuilder()
|
||||
{
|
||||
this->emplace<TimestampElement>();
|
||||
this->message().flags.set(MessageFlag::System);
|
||||
|
||||
QString text;
|
||||
|
||||
this->emplaceSystemTextAndUpdate(action.source.login, text)
|
||||
->setLink({Link::UserInfo, "id:" + action.source.id});
|
||||
this->emplaceSystemTextAndUpdate("initiated a raid to", text);
|
||||
this->emplaceSystemTextAndUpdate(action.target + ".", text)
|
||||
->setLink({Link::UserInfo, action.target});
|
||||
|
||||
this->message().messageText = text;
|
||||
this->message().searchText = text;
|
||||
}
|
||||
|
||||
MessageBuilder::MessageBuilder(const UnraidAction &action)
|
||||
: MessageBuilder()
|
||||
{
|
||||
this->emplace<TimestampElement>();
|
||||
this->message().flags.set(MessageFlag::System);
|
||||
|
||||
QString text;
|
||||
|
||||
this->emplaceSystemTextAndUpdate(action.source.login, text)
|
||||
->setLink({Link::UserInfo, "id:" + action.source.id});
|
||||
this->emplaceSystemTextAndUpdate("canceled the raid.", text);
|
||||
|
||||
this->message().messageText = text;
|
||||
this->message().searchText = text;
|
||||
}
|
||||
|
||||
MessageBuilder::MessageBuilder(const AutomodUserAction &action)
|
||||
: MessageBuilder()
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace chatterino {
|
||||
struct BanAction;
|
||||
struct UnbanAction;
|
||||
struct WarnAction;
|
||||
struct RaidAction;
|
||||
struct UnraidAction;
|
||||
struct AutomodAction;
|
||||
struct AutomodUserAction;
|
||||
struct AutomodInfoAction;
|
||||
@@ -127,6 +129,8 @@ public:
|
||||
MessageBuilder(const BanAction &action, uint32_t count = 1);
|
||||
MessageBuilder(const UnbanAction &action);
|
||||
MessageBuilder(const WarnAction &action);
|
||||
MessageBuilder(const RaidAction &action);
|
||||
MessageBuilder(const UnraidAction &action);
|
||||
MessageBuilder(const AutomodUserAction &action);
|
||||
|
||||
MessageBuilder(LiveUpdatesAddEmoteMessageTag, const QString &platform,
|
||||
|
||||
Reference in New Issue
Block a user