mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Update API scheme on layer 160: Replies.
This commit is contained in:
@@ -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 <>
|
||||
|
||||
Reference in New Issue
Block a user