Skip to content
Snippets Groups Projects
Commit cbecb9fe authored by kamathmanu's avatar kamathmanu
Browse files

Objects for filtering API events

parent ed631556
No related branches found
No related tags found
No related merge requests found
#pragma once
#if __has_include(<nlohmann/json_fwd.hpp>)
#include <nlohmann/json_fwd.hpp>
#else
#include <nlohmann/json.hpp>
#endif
#include <string>
//! Filters can be created on the server and can be
//! passed as a parameter to APIs which return events.
namespace mtx {
namespace filters {
struct Filter {
//! A string to search for in the room metadata,
//! e.g. name, topic, canonical alias etc. (Optional).
std::string generic_search_term;
};
void
from_json(const nlohmann::json &obj, Filter &res);
void
to_json(nlohmann::json &obj, const Filter &res);
} // namespace filters
} // namespace mtx
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