Update API scheme on layer 160: Replies.

This commit is contained in:
John Preston
2023-05-25 13:32:13 +04:00
parent 455cb0d21b
commit 04e7ce4408
50 changed files with 364 additions and 374 deletions
+31
View File
@@ -136,6 +136,37 @@ struct GlobalMsgId {
}
};
using StoryId = int32;
struct FullStoryId {
PeerId peer = 0;
StoryId story = 0;
[[nodiscard]] bool valid() const {
return peer != 0 && story != 0;
}
explicit operator bool() const {
return valid();
}
friend inline auto operator<=>(FullStoryId, FullStoryId) = default;
friend inline bool operator==(FullStoryId, FullStoryId) = default;
};
struct FullReplyTo {
MsgId msgId = 0;
MsgId topicRootId = 0;
FullStoryId storyId;
[[nodiscard]] bool valid() const {
return msgId || storyId;
}
explicit operator bool() const {
return valid();
}
friend inline auto operator<=>(FullReplyTo, FullReplyTo) = default;
friend inline bool operator==(FullReplyTo, FullReplyTo) = default;
};
namespace std {
template <>