Debian Codegraph @

mtxclient/include/mtx/events/nheko_extensions/hidden_events.hpp

raw symbols SCIP
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 <optional>
7 #include <vector>
8
9 #if __has_include(<nlohmann/json_fwd.hpp>)
10 #include <nlohmann/json_fwd.hpp>
11 #else
12 #include <nlohmann/json.hpp>
13 #endif
14
15 #include "mtx/events/event_type.hpp"
16
17 namespace mtx {
18 namespace events {
19 namespace account_data {
20 //! Custom nheko specific event types
21 namespace nheko_extensions {
22 //! Custom event to hide certain event types in nheko
23 struct HiddenEvents
24 {
25 //! The hidden event types
26 std::optional<std::vector<EventType>> hidden_event_types;
27
28 friend void from_json(const nlohmann::json &obj, HiddenEvents &content);
29 friend void to_json(nlohmann::json &obj, const HiddenEvents &content);
30 };
31 }
32 } // namespace account_data
33 } // namespace events
34 } // namespace mtx