Move stringify function to rapidjson-helpers
This commit is contained in:
@@ -68,7 +68,7 @@ bool PubSubClient::listen(rapidjson::Document &message)
|
||||
|
||||
rj::set(message, "nonce", uuid);
|
||||
|
||||
std::string payload = stringify(message);
|
||||
std::string payload = rj::stringify(message);
|
||||
sentMessages[uuid.toStdString()] = payload;
|
||||
|
||||
this->send(payload.c_str());
|
||||
@@ -100,7 +100,7 @@ void PubSubClient::unlistenPrefix(const std::string &prefix)
|
||||
|
||||
rj::set(message, "nonce", CreateUUID());
|
||||
|
||||
std::string payload = stringify(message);
|
||||
std::string payload = rj::stringify(message);
|
||||
sentMessages[uuid.toStdString()] = payload;
|
||||
|
||||
this->send(payload.c_str());
|
||||
@@ -747,7 +747,7 @@ void PubSub::handleMessageResponse(const rapidjson::Value &outerData)
|
||||
std::string moderationAction;
|
||||
|
||||
if (!rj::getSafe(data, "moderation_action", moderationAction)) {
|
||||
debug::Log("Missing moderation action in data: {}", stringify(data));
|
||||
debug::Log("Missing moderation action in data: {}", rj::stringify(data));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@ bool getTargetUser(const rapidjson::Value &data, ActionUser &user)
|
||||
return rj::getSafe(data, "target_user_id", user.id);
|
||||
}
|
||||
|
||||
std::string stringify(const rapidjson::Value &v)
|
||||
{
|
||||
return pajlada::Settings::SettingManager::stringify(v);
|
||||
}
|
||||
|
||||
rapidjson::Document createListenMessage(const std::vector<std::string> &topicsVec,
|
||||
std::shared_ptr<providers::twitch::TwitchAccount> account)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,6 @@ bool getCreatedByUser(const rapidjson::Value &data, ActionUser &user);
|
||||
|
||||
bool getTargetUser(const rapidjson::Value &data, ActionUser &user);
|
||||
|
||||
std::string stringify(const rapidjson::Value &v);
|
||||
|
||||
rapidjson::Document createListenMessage(const std::vector<std::string> &topicsVec,
|
||||
std::shared_ptr<providers::twitch::TwitchAccount> account);
|
||||
rapidjson::Document createUnlistenMessage(const std::vector<std::string> &topicsVec);
|
||||
|
||||
Reference in New Issue
Block a user