mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Update API scheme on layer 176.
This commit is contained in:
parent
8545a14763
commit
d5e920e45a
6 changed files with 24 additions and 9 deletions
|
@ -192,6 +192,7 @@ struct AwaySettings {
|
|||
BusinessRecipients recipients;
|
||||
AwaySchedule schedule;
|
||||
BusinessShortcutId shortcutId = 0;
|
||||
bool offlineOnly = false;
|
||||
|
||||
explicit operator bool() const {
|
||||
return schedule.type != AwayScheduleType::Never;
|
||||
|
|
|
@ -94,7 +94,9 @@ template <typename Flag>
|
|||
}
|
||||
|
||||
[[nodiscard]] MTPInputBusinessAwayMessage ToMTP(const AwaySettings &data) {
|
||||
using Flag = MTPDinputBusinessAwayMessage::Flag;
|
||||
return MTP_inputBusinessAwayMessage(
|
||||
MTP_flags(data.offlineOnly ? Flag::f_offline_only : Flag()),
|
||||
MTP_int(data.shortcutId),
|
||||
ToMTP(data.schedule),
|
||||
ToMTP(data.recipients));
|
||||
|
|
|
@ -196,6 +196,7 @@ MTPDialogFilter ChatFilter::tl(FilterId replaceId) const {
|
|||
MTP_int(replaceId ? replaceId : _id),
|
||||
MTP_string(_title),
|
||||
MTP_string(_iconEmoji),
|
||||
MTPint(), // color
|
||||
MTP_vector<MTPInputPeer>(pinned),
|
||||
MTP_vector<MTPInputPeer>(include));
|
||||
}
|
||||
|
@ -221,6 +222,7 @@ MTPDialogFilter ChatFilter::tl(FilterId replaceId) const {
|
|||
MTP_int(replaceId ? replaceId : _id),
|
||||
MTP_string(_title),
|
||||
MTP_string(_iconEmoji),
|
||||
MTPint(), // color
|
||||
MTP_vector<MTPInputPeer>(pinned),
|
||||
MTP_vector<MTPInputPeer>(include),
|
||||
MTP_vector<MTPInputPeer>(never));
|
||||
|
@ -361,8 +363,8 @@ void ChatFilters::load(bool force) {
|
|||
auto &api = _owner->session().api();
|
||||
api.request(_loadRequestId).cancel();
|
||||
_loadRequestId = api.request(MTPmessages_GetDialogFilters(
|
||||
)).done([=](const MTPVector<MTPDialogFilter> &result) {
|
||||
received(result.v);
|
||||
)).done([=](const MTPmessages_DialogFilters &result) {
|
||||
received(result.data().vfilters().v);
|
||||
_loadRequestId = 0;
|
||||
}).fail([=] {
|
||||
_loadRequestId = 0;
|
||||
|
|
|
@ -97,6 +97,7 @@ Data::BusinessRecipients FromMTP(
|
|||
auto result = Data::AwaySettings{
|
||||
.recipients = FromMTP(owner, data.vrecipients()),
|
||||
.shortcutId = data.vshortcut_id().v,
|
||||
.offlineOnly = data.is_offline_only(),
|
||||
};
|
||||
data.vschedule().match([&](
|
||||
const MTPDbusinessAwayMessageScheduleAlways &) {
|
||||
|
|
|
@ -193,8 +193,8 @@ void Step::finish(const MTPUser &user, QImage &&photo) {
|
|||
}
|
||||
|
||||
api().request(MTPmessages_GetDialogFilters(
|
||||
)).done([=](const MTPVector<MTPDialogFilter> &result) {
|
||||
createSession(user, photo, result.v);
|
||||
)).done([=](const MTPmessages_DialogFilters &result) {
|
||||
createSession(user, photo, result.data().vfilters().v);
|
||||
}).fail([=] {
|
||||
createSession(user, photo, QVector<MTPDialogFilter>());
|
||||
}).send();
|
||||
|
|
|
@ -1234,9 +1234,9 @@ bankCardOpenUrl#f568028a url:string name:string = BankCardOpenUrl;
|
|||
|
||||
payments.bankCardData#3e24e573 title:string open_urls:Vector<BankCardOpenUrl> = payments.BankCardData;
|
||||
|
||||
dialogFilter#7438f7e8 flags:# contacts:flags.0?true non_contacts:flags.1?true groups:flags.2?true broadcasts:flags.3?true bots:flags.4?true exclude_muted:flags.11?true exclude_read:flags.12?true exclude_archived:flags.13?true id:int title:string emoticon:flags.25?string pinned_peers:Vector<InputPeer> include_peers:Vector<InputPeer> exclude_peers:Vector<InputPeer> = DialogFilter;
|
||||
dialogFilter#5fb5523b flags:# contacts:flags.0?true non_contacts:flags.1?true groups:flags.2?true broadcasts:flags.3?true bots:flags.4?true exclude_muted:flags.11?true exclude_read:flags.12?true exclude_archived:flags.13?true id:int title:string emoticon:flags.25?string color:flags.27?int pinned_peers:Vector<InputPeer> include_peers:Vector<InputPeer> exclude_peers:Vector<InputPeer> = DialogFilter;
|
||||
dialogFilterDefault#363293ae = DialogFilter;
|
||||
dialogFilterChatlist#d64a04a8 flags:# has_my_invites:flags.26?true id:int title:string emoticon:flags.25?string pinned_peers:Vector<InputPeer> include_peers:Vector<InputPeer> = DialogFilter;
|
||||
dialogFilterChatlist#9fe28ea4 flags:# has_my_invites:flags.26?true id:int title:string emoticon:flags.25?string color:flags.27?int pinned_peers:Vector<InputPeer> include_peers:Vector<InputPeer> = DialogFilter;
|
||||
|
||||
dialogFilterSuggested#77744d4a filter:DialogFilter description:string = DialogFilterSuggested;
|
||||
|
||||
|
@ -1683,9 +1683,9 @@ inputBusinessGreetingMessage#194cb3b shortcut_id:int recipients:InputBusinessRec
|
|||
|
||||
businessGreetingMessage#e519abab shortcut_id:int recipients:BusinessRecipients no_activity_days:int = BusinessGreetingMessage;
|
||||
|
||||
inputBusinessAwayMessage#edac03f4 shortcut_id:int schedule:BusinessAwayMessageSchedule recipients:InputBusinessRecipients = InputBusinessAwayMessage;
|
||||
inputBusinessAwayMessage#832175e0 flags:# offline_only:flags.0?true shortcut_id:int schedule:BusinessAwayMessageSchedule recipients:InputBusinessRecipients = InputBusinessAwayMessage;
|
||||
|
||||
businessAwayMessage#1bd9bebc shortcut_id:int schedule:BusinessAwayMessageSchedule recipients:BusinessRecipients = BusinessAwayMessage;
|
||||
businessAwayMessage#ef156a5c flags:# offline_only:flags.0?true shortcut_id:int schedule:BusinessAwayMessageSchedule recipients:BusinessRecipients = BusinessAwayMessage;
|
||||
|
||||
timezone#ff9289f5 id:string name:string utc_offset:int = Timezone;
|
||||
|
||||
|
@ -1700,6 +1700,12 @@ inputQuickReplyShortcutId#1190cf1 shortcut_id:int = InputQuickReplyShortcut;
|
|||
messages.quickReplies#c68d6695 quick_replies:Vector<QuickReply> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.QuickReplies;
|
||||
messages.quickRepliesNotModified#5f91eb5b = messages.QuickReplies;
|
||||
|
||||
connectedBot#e7e999e7 flags:# can_reply:flags.0?true bot_id:long recipients:BusinessRecipients = ConnectedBot;
|
||||
|
||||
account.connectedBots#17d7f87b connected_bots:Vector<ConnectedBot> users:Vector<User> = account.ConnectedBots;
|
||||
|
||||
messages.dialogFilters#2ad93719 flags:# tags_enabled:flags.0?true filters:Vector<DialogFilter> = messages.DialogFilters;
|
||||
|
||||
---functions---
|
||||
|
||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||
|
@ -1829,6 +1835,8 @@ account.updateBusinessWorkHours#4b00e066 flags:# business_work_hours:flags.0?Bus
|
|||
account.updateBusinessLocation#9e6b131a flags:# geo_point:flags.1?InputGeoPoint address:flags.0?string = Bool;
|
||||
account.updateBusinessGreetingMessage#66cdafc4 flags:# message:flags.0?InputBusinessGreetingMessage = Bool;
|
||||
account.updateBusinessAwayMessage#a26a7fa5 flags:# message:flags.0?InputBusinessAwayMessage = Bool;
|
||||
account.updateConnectedBot#9c2d527d flags:# can_reply:flags.0?true deleted:flags.1?true bot:InputUser recipients:InputBusinessRecipients = Updates;
|
||||
account.getConnectedBots#4ea4c80f = account.ConnectedBots;
|
||||
|
||||
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
|
||||
users.getFullUser#b60f5918 id:InputUser = users.UserFull;
|
||||
|
@ -1977,7 +1985,7 @@ messages.sendScheduledMessages#bd38850a peer:InputPeer id:Vector<int> = Updates;
|
|||
messages.deleteScheduledMessages#59ae2b16 peer:InputPeer id:Vector<int> = Updates;
|
||||
messages.getPollVotes#b86e380e flags:# peer:InputPeer id:int option:flags.0?bytes offset:flags.1?string limit:int = messages.VotesList;
|
||||
messages.toggleStickerSets#b5052fea flags:# uninstall:flags.0?true archive:flags.1?true unarchive:flags.2?true stickersets:Vector<InputStickerSet> = Bool;
|
||||
messages.getDialogFilters#f19ed96d = Vector<DialogFilter>;
|
||||
messages.getDialogFilters#efd48c89 = messages.DialogFilters;
|
||||
messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>;
|
||||
messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;
|
||||
messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool;
|
||||
|
@ -2067,6 +2075,7 @@ messages.deleteQuickReplyShortcut#3cc04740 shortcut_id:int = Bool;
|
|||
messages.getQuickReplyMessages#94a495c3 flags:# shortcut_id:int id:flags.0?Vector<int> hash:long = messages.Messages;
|
||||
messages.sendQuickReplyMessages#33153ad4 peer:InputPeer shortcut_id:int = Updates;
|
||||
messages.deleteQuickReplyMessages#e105e910 shortcut_id:int id:Vector<int> = Updates;
|
||||
messages.toggleDialogFilterTags#fd2dda49 enabled:Bool = Bool;
|
||||
|
||||
updates.getState#edd4882a = updates.State;
|
||||
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
|
||||
|
|
Loading…
Add table
Reference in a new issue