2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use getters in MTP classes.

This commit is contained in:
John Preston
2019-07-05 15:38:38 +02:00
parent 3ca28c0cf9
commit 567bf60644
100 changed files with 2807 additions and 2672 deletions

View File

@@ -303,18 +303,18 @@ AdminLog::OwnedItem GenerateContactItem(
MTP_int(viaBotId),
MTP_int(replyTo),
MTP_int(unixtime()),
MTP_string(QString()),
MTP_string(),
MTP_messageMediaContact(
MTP_string(data.phone),
MTP_string(data.firstName),
MTP_string(data.lastName),
MTP_string(QString()),
MTP_string(),
MTP_int(0)),
MTPReplyMarkup(),
MTPVector<MTPMessageEntity>(),
MTP_int(0),
MTP_int(0),
MTP_string(QString()),
MTP_string(),
MTP_long(0));
const auto item = history->owner().makeMessage(
history,

View File

@@ -280,7 +280,7 @@ Helper::Helper(not_null<AuthSession*> session)
request(MTPhelp_GetSupportName(
)).done([=](const MTPhelp_SupportName &result) {
result.match([&](const MTPDhelp_supportName &data) {
setSupportName(qs(data.vname));
setSupportName(qs(data.vname()));
});
}).fail([=](const RPCError &error) {
setSupportName(
@@ -434,11 +434,11 @@ void Helper::applyInfo(
};
result.match([&](const MTPDhelp_userInfo &data) {
auto info = UserInfo();
info.author = qs(data.vauthor);
info.date = data.vdate.v;
info.author = qs(data.vauthor());
info.date = data.vdate().v;
info.text = TextWithEntities{
qs(data.vmessage),
TextUtilities::EntitiesFromMTP(data.ventities.v) };
qs(data.vmessage()),
TextUtilities::EntitiesFromMTP(data.ventities().v) };
if (info.text.empty()) {
remove();
} else if (_userInformation[user] != info) {