mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Update API scheme on layer 160.
This commit is contained in:
parent
e7ccf5d8ad
commit
a57e9990b0
4 changed files with 30 additions and 10 deletions
|
@ -1830,7 +1830,11 @@ void ApiWrap::requestNotifySettings(const MTPInputNotifyPeer &peer) {
|
|||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPBool()));
|
||||
MTPBool(),
|
||||
MTPBool(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound()));
|
||||
_notifySettingRequests.erase(key);
|
||||
}).send();
|
||||
_notifySettingRequests.emplace(key, requestId);
|
||||
|
|
|
@ -195,7 +195,11 @@ void NotifySettings::resetToDefault(not_null<Data::Thread*> thread) {
|
|||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPBool());
|
||||
MTPBool(),
|
||||
MTPBool(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound());
|
||||
if (thread->notify().change(empty)) {
|
||||
updateLocal(thread);
|
||||
thread->session().api().updateNotifySettingsDelayed(thread);
|
||||
|
@ -227,7 +231,11 @@ void NotifySettings::resetToDefault(not_null<PeerData*> peer) {
|
|||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPBool());
|
||||
MTPBool(),
|
||||
MTPBool(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound());
|
||||
if (peer->notify().change(empty)) {
|
||||
updateLocal(peer);
|
||||
peer->session().api().updateNotifySettingsDelayed(peer);
|
||||
|
|
|
@ -19,7 +19,9 @@ namespace {
|
|||
MTPBool(),
|
||||
MTPint(),
|
||||
MTPNotificationSound(),
|
||||
MTPBool());
|
||||
MTPBool(),
|
||||
MTPBool(),
|
||||
MTPNotificationSound());
|
||||
}
|
||||
|
||||
[[nodiscard]] NotifySound ParseSound(const MTPNotificationSound &sound) {
|
||||
|
@ -194,7 +196,9 @@ MTPinputPeerNotifySettings NotifyPeerSettingsValue::serialize() const {
|
|||
MTP_bool(_silent.value_or(false)),
|
||||
MTP_int(_mute.value_or(false)),
|
||||
SerializeSound(_sound),
|
||||
MTP_bool(_storiesMuted.value_or(false)));
|
||||
MTP_bool(_storiesMuted.value_or(false)),
|
||||
MTP_bool(false), // stories_hide_sender
|
||||
SerializeSound(std::nullopt)); // stories_sound
|
||||
}
|
||||
|
||||
PeerNotifySettings::PeerNotifySettings() = default;
|
||||
|
@ -245,7 +249,11 @@ bool PeerNotifySettings::change(
|
|||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
SerializeSound(sound),
|
||||
storiesMuted ? MTP_bool(*storiesMuted) : MTPBool()));
|
||||
storiesMuted ? MTP_bool(*storiesMuted) : MTPBool(),
|
||||
MTPBool(), // stories_hide_sender
|
||||
MTPNotificationSound(),
|
||||
MTPNotificationSound(),
|
||||
SerializeSound(std::nullopt))); // stories_sound
|
||||
}
|
||||
|
||||
std::optional<TimeId> PeerNotifySettings::muteUntil() const {
|
||||
|
|
|
@ -201,9 +201,9 @@ inputNotifyChats#4a95e84e = InputNotifyPeer;
|
|||
inputNotifyBroadcasts#b1db7c7e = InputNotifyPeer;
|
||||
inputNotifyForumTopic#5c467992 peer:InputPeer top_msg_id:int = InputNotifyPeer;
|
||||
|
||||
inputPeerNotifySettings#e1e51e85 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?NotificationSound stories_muted:flags.6?Bool = InputPeerNotifySettings;
|
||||
inputPeerNotifySettings#cacb6ae2 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?NotificationSound stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool stories_sound:flags.8?NotificationSound = InputPeerNotifySettings;
|
||||
|
||||
peerNotifySettings#6cdc6e52 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound stories_muted:flags.6?Bool = PeerNotifySettings;
|
||||
peerNotifySettings#99622c0c flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool stories_ios_sound:flags.8?NotificationSound stories_android_sound:flags.9?NotificationSound stories_other_sound:flags.10?NotificationSound = PeerNotifySettings;
|
||||
|
||||
peerSettings#a518110d flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int = PeerSettings;
|
||||
|
||||
|
@ -529,7 +529,7 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
|
|||
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
|
||||
documentAttributeAnimated#11b58939 = DocumentAttribute;
|
||||
documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
|
||||
documentAttributeVideo#d38ff1c2 flags:# round_message:flags.0?true supports_streaming:flags.1?true duration:double w:int h:int preload_prefix_size:flags.2?int = DocumentAttribute;
|
||||
documentAttributeVideo#d38ff1c2 flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int = DocumentAttribute;
|
||||
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
|
||||
documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
|
||||
documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
|
||||
|
@ -1632,7 +1632,7 @@ account.resendPasswordEmail#7a7f2a15 = Bool;
|
|||
account.cancelPasswordEmail#c1cbd5b6 = Bool;
|
||||
account.getContactSignUpNotification#9f07c728 = Bool;
|
||||
account.setContactSignUpNotification#cff43f61 silent:Bool = Bool;
|
||||
account.getNotifyExceptions#53577479 flags:# compare_sound:flags.1?true peer:flags.0?InputNotifyPeer = Updates;
|
||||
account.getNotifyExceptions#53577479 flags:# compare_sound:flags.1?true compare_stories:flags.2?true peer:flags.0?InputNotifyPeer = Updates;
|
||||
account.getWallPaper#fc8ddbea wallpaper:InputWallPaper = WallPaper;
|
||||
account.uploadWallPaper#e39a8f03 flags:# for_chat:flags.0?true file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;
|
||||
account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
|
||||
|
|
Loading…
Add table
Reference in a new issue