| 1 | #pragma once |
| 2 | |
| 3 | #include <string> |
| 4 | #include <vector> |
| 5 | |
| 6 | #if __has_include(<nlohmann/json_fwd.hpp>) |
| 7 | #include <nlohmann/json_fwd.hpp> |
| 8 | #else |
| 9 | #include <nlohmann/json.hpp> |
| 10 | #endif |
| 11 | |
| 12 | namespace mtx { |
| 13 | namespace events { |
| 14 | namespace account_data { |
| 15 | |
| 16 | //! An entry in `m.ignored_user_list`. Currently only the key (mxid) is supported, not arbitrary |
| 17 | //! values. |
| 18 | struct IgnoredUser |
| 19 | { |
| 20 | std::string id; |
| 21 | }; |
| 22 | |
| 23 | struct IgnoredUsers |
| 24 | { |
| 25 | std::vector<IgnoredUser> users; |
| 26 | |
| 27 | //! Deserialization method needed by @p nlohmann::json. |
| 28 | friend void from_json(const nlohmann::json &obj, IgnoredUsers &content); |
| 29 | |
| 30 | //! Serialization method needed by @p nlohmann::json. |
| 31 | friend void to_json(nlohmann::json &obj, const IgnoredUsers &content); |
| 32 | }; |
| 33 | |
| 34 | } // namespace account_data |
| 35 | } // namespace events |
| 36 | } // namespace mtx |