2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Update API scheme to layer 100.

This commit is contained in:
John Preston
2019-05-20 16:57:25 +02:00
parent 68fb9b8b67
commit c4aac5fa0e
26 changed files with 325 additions and 169 deletions

View File

@@ -4715,14 +4715,14 @@ void WriteExportSettings(const Export::Settings &settings) {
<< quint32(settings.format)
<< settings.path
<< quint32(settings.availableAt);
settings.singlePeer.match([&](const MTPDinputPeerUser &user) {
settings.singlePeer.match([&](const MTPDinputPeerUser & user) {
data.stream
<< kSinglePeerTypeUser
<< qint32(user.vuser_id.v)
<< quint64(user.vaccess_hash.v);
}, [&](const MTPDinputPeerChat &chat) {
}, [&](const MTPDinputPeerChat & chat) {
data.stream << kSinglePeerTypeChat << qint32(chat.vchat_id.v);
}, [&](const MTPDinputPeerChannel &channel) {
}, [&](const MTPDinputPeerChannel & channel) {
data.stream
<< kSinglePeerTypeChannel
<< qint32(channel.vchannel_id.v)
@@ -4731,6 +4731,10 @@ void WriteExportSettings(const Export::Settings &settings) {
data.stream << kSinglePeerTypeSelf;
}, [&](const MTPDinputPeerEmpty &) {
data.stream << kSinglePeerTypeEmpty;
}, [&](const MTPDinputPeerUserFromMessage &) {
Unexpected("From message peer in single peer export settings.");
}, [&](const MTPDinputPeerChannelFromMessage &) {
Unexpected("From message peer in single peer export settings.");
});
data.stream << qint32(settings.singlePeerFrom);
data.stream << qint32(settings.singlePeerTill);