mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Update API scheme to layer 167.
Support quote offset passing to API. Support simple phrases in giveaway results message.
This commit is contained in:
@@ -72,7 +72,7 @@ MTPInputReplyTo ReplyToForMTP(
|
||||
| (external ? Flag::f_reply_to_peer_id : Flag())
|
||||
| (replyTo.quote.text.isEmpty()
|
||||
? Flag()
|
||||
: Flag::f_quote_text)
|
||||
: (Flag::f_quote_text | Flag::f_quote_offset))
|
||||
| (quoteEntities.v.isEmpty()
|
||||
? Flag()
|
||||
: Flag::f_quote_entities)),
|
||||
@@ -82,7 +82,8 @@ MTPInputReplyTo ReplyToForMTP(
|
||||
? owner->peer(replyTo.messageId.peer)->input
|
||||
: MTPInputPeer()),
|
||||
MTP_string(replyTo.quote.text),
|
||||
quoteEntities);
|
||||
quoteEntities,
|
||||
MTP_int(replyTo.quoteOffset));
|
||||
}
|
||||
return MTPInputReplyTo();
|
||||
}
|
||||
@@ -983,6 +984,7 @@ int Histories::sendPreparedMessage(
|
||||
.quote = replyTo.quote,
|
||||
.storyId = replyTo.storyId,
|
||||
.topicRootId = convertTopicReplyToId(history, replyTo.topicRootId),
|
||||
.quoteOffset = replyTo.quoteOffset,
|
||||
};
|
||||
return v::match(message(history, realReplyTo), [&](const auto &request) {
|
||||
const auto type = RequestType::Send;
|
||||
|
@@ -161,6 +161,7 @@ struct FullReplyTo {
|
||||
TextWithEntities quote;
|
||||
FullStoryId storyId;
|
||||
MsgId topicRootId = 0;
|
||||
int quoteOffset = 0;
|
||||
|
||||
[[nodiscard]] bool valid() const {
|
||||
return messageId || (storyId && peerIsUser(storyId.peer));
|
||||
|
Reference in New Issue
Block a user