Skip to content
Snippets Groups Projects
Unverified Commit d558041f authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #101 from ramajd/master

add default_payload to PusherData struct
parents 4f9709ec b30d3545
Branches reportContent
No related tags found
No related merge requests found
Pipeline #5622 failed
......@@ -10,11 +10,7 @@
#include <mtx/events/collections.hpp>
#include <mtx/identifiers.hpp>
#if __has_include(<nlohmann/json_fwd.hpp>)
#include <nlohmann/json_fwd.hpp>
#else
#include <nlohmann/json.hpp>
#endif
namespace mtx {
//! Namespace for request structs
......@@ -408,6 +404,8 @@ struct PusherData
//! defined in the Push Gateway Specification. Currently the only format available is
//! 'event_id_only'.
std::string format;
//! Push gateway specific data.
std::optional<nlohmann::json> default_payload;
friend void to_json(nlohmann::json &obj, const PusherData &data);
};
......
......@@ -267,6 +267,9 @@ to_json(json &obj, const PusherData &data)
if (!data.format.empty()) {
obj["format"] = data.format;
}
if (data.default_payload) {
obj["default_payload"] = data.default_payload.value();
}
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment