1 | #pragma once |
2 | |
3 | /// @file |
4 | /// @brief The state event describing the topic in a room. |
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 <string> |
13 | |
14 | namespace mtx { |
15 | namespace events { |
16 | namespace state { |
17 | |
18 | /// @brief Content for the `m.room.topic` state event. |
19 | // |
20 | /// A topic is a short message detailing what is currently being discussed in the room. |
21 | struct Topic |
22 | { |
23 | //! The topic text. |
24 | std::string topic; |
25 | |
26 | friend void from_json(const nlohmann::json &obj, Topic &event); |
27 | friend void to_json(nlohmann::json &obj, const Topic &event); |
28 | }; |
29 | |
30 | } // namespace state |
31 | } // namespace events |
32 | } // namespace mtx |
33 | |