Debian Codegraph @

mtxclient/include/mtx/events/reaction.hpp

raw symbols SCIP
1 #pragma once
2
3 /// @file
4 /// @brief A reaction event used to attach small annotations to events.
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 #include "mtx/events/common.hpp"
13
14 namespace mtx {
15 namespace events {
16 namespace msg {
17
18 //! Content for the `m.reaction` event.
19 struct Reaction
20 {
21 //! Should be an annotation relation
22 common::Relations relations;
23
24 friend void from_json(const nlohmann::json &obj, Reaction &event);
25 friend void to_json(nlohmann::json &obj, const Reaction &event);
26 };
27
28 } // namespace msg
29 } // namespace events
30 } // namespace mtx