1#pragma once
2
3/// @file
4/// @brief The fully read marker for this user.
5
6#include <string>
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
14namespace mtx {
15namespace events {
16namespace account_data {
17
18/// @brief The fully read marker for this user / `m.fully_read`.
19///
20/// The history for a given room may be split into three sections: messages the user has read (or
21/// indicated they aren't interested in them), messages the user might have read some but not
22/// others, and messages the user hasn't seen yet. The "fully read marker" (also known as a "read
23/// marker") marks the last event of the first section, whereas the user's read receipt marks the
24/// last event of the second section.
25struct FullyRead
26{
27 //! Required. The event the user's read marker is located at in the room.
28 std::string event_id;
29
30 //! Deserialization method needed by @p nlohmann::json.
31 friend void from_json(const nlohmann::json &obj, FullyRead &content);
32
33 //! Serialization method needed by @p nlohmann::json.
34 friend void to_json(nlohmann::json &obj, const FullyRead &content);
35};
36
37} // namespace state
38} // namespace events
39} // namespace mtx
40