1 | #pragma once |
2 | |
3 | /// @file |
4 | /// @brief A nheko specific event in account data used to hide events across different clients. |
5 | |
6 | #include <vector> |
7 | |
8 | #if __has_include(<nlohmann/json_fwd.hpp>) |
9 | #include <nlohmann/json_fwd.hpp> |
10 | #else |
11 | #include <nlohmann/json.hpp> |
12 | #endif |
13 | |
14 | #include "mtx/events.hpp" |
15 | |
16 | namespace mtx { |
17 | namespace events { |
18 | namespace account_data { |
19 | //! Custom nheko specific event types |
20 | namespace nheko_extensions { |
21 | //! Custom event to hide certain event types in nheko |
22 | struct HiddenEvents |
23 | { |
24 | //! The hidden event types |
25 | std::optional<std::vector<EventType>> hidden_event_types; |
26 | |
27 | friend void from_json(const nlohmann::json &obj, HiddenEvents &content); |
28 | friend void to_json(nlohmann::json &obj, const HiddenEvents &content); |
29 | }; |
30 | } |
31 | } // namespace account_data |
32 | } // namespace events |
33 | } // namespace mtx |
34 | |