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
+8 -2
View File
@@ -8,7 +8,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "api/api_common.h"
#include "base/qt/qt_key_modifiers.h"
#include "data/data_histories.h"
#include "data/data_thread.h"
#include "history/history.h"
namespace Api {
@@ -17,8 +19,8 @@ SendAction::SendAction(
SendOptions options)
: history(thread->owningHistory())
, options(options)
, replyTo(thread->topicRootId())
, topicRootId(replyTo) {
, replyTo({ .msgId = thread->topicRootId() }) {
replyTo.topicRootId = replyTo.msgId;
}
SendOptions DefaultSendWhenOnlineOptions() {
@@ -28,4 +30,8 @@ SendOptions DefaultSendWhenOnlineOptions() {
};
}
MTPInputReplyTo SendAction::mtpReplyTo() const {
return Data::ReplyToForMTP(&history->owner(), replyTo);
}
} // namespace Api