mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
18 lines
464 B
C++
18 lines
464 B
C++
|
#include "providers/twitch/pubsubmessages/ChatModeratorAction.hpp"
|
||
|
|
||
|
namespace chatterino {
|
||
|
|
||
|
PubSubChatModeratorActionMessage::PubSubChatModeratorActionMessage(
|
||
|
const QJsonObject &root)
|
||
|
: typeString(root.value("type").toString())
|
||
|
, data(root.value("data").toObject())
|
||
|
{
|
||
|
auto oType = magic_enum::enum_cast<Type>(this->typeString.toStdString());
|
||
|
if (oType.has_value())
|
||
|
{
|
||
|
this->type = oType.value();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
} // namespace chatterino
|