From 29c4e4c73346fc48b776ee94a29510a61c4997a6 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 22 Oct 2019 16:24:55 +0300 Subject: [PATCH] Update layer to 103. Disable push notifications from muted chats. GitOrigin-RevId: 5287f30dd82a50c567bcf039eee479e790868f7d --- td/generate/scheme/telegram_api.tl | 2 +- td/generate/scheme/telegram_api.tlo | Bin 189384 -> 189464 bytes td/telegram/DeviceTokenManager.cpp | 6 ++++-- td/telegram/Version.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/td/generate/scheme/telegram_api.tl b/td/generate/scheme/telegram_api.tl index 3dc1c681..327363e7 100644 --- a/td/generate/scheme/telegram_api.tl +++ b/td/generate/scheme/telegram_api.tl @@ -1076,7 +1076,7 @@ auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentC auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool; auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector = Bool; -account.registerDevice#5cbea590 token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector = Bool; +account.registerDevice#68976c6f flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector = Bool; account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector = Bool; account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool; account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings; diff --git a/td/generate/scheme/telegram_api.tlo b/td/generate/scheme/telegram_api.tlo index bf7a8eaeb61b53711923dfdedc1642f82b0cf515..c1b8446a33ffb8080574967acccdea2531b59b3f 100644 GIT binary patch delta 52 zcmV-40L%Z##|xOq3xI?Hv;y!q1aEAYXqWUi0w9+}q5&-kZf{?0b#!H9lL1pBm-Ija KM7Ll#0%)r-ffP3Y delta 36 ucmV+<0NekV$P38F3xI?Hv;y!q1dye^T$l7W0w4hempwrOOSiB%0%)rn@D4iw diff --git a/td/telegram/DeviceTokenManager.cpp b/td/telegram/DeviceTokenManager.cpp index c7c9b3e2..4ca15f26 100644 --- a/td/telegram/DeviceTokenManager.cpp +++ b/td/telegram/DeviceTokenManager.cpp @@ -371,8 +371,10 @@ void DeviceTokenManager::loop() { net_query = G()->net_query_creator().create( create_storer(telegram_api::account_unregisterDevice(token_type, info.token, std::move(other_user_ids)))); } else { - net_query = G()->net_query_creator().create(create_storer(telegram_api::account_registerDevice( - token_type, info.token, info.is_app_sandbox, BufferSlice(info.encryption_key), std::move(other_user_ids)))); + int32 flags = telegram_api::account_registerDevice::NO_MUTED_MASK; + net_query = G()->net_query_creator().create(create_storer( + telegram_api::account_registerDevice(flags, false /*ignored*/, token_type, info.token, info.is_app_sandbox, + BufferSlice(info.encryption_key), std::move(other_user_ids)))); } info.net_query_id = net_query->id(); G()->net_query_dispatcher().dispatch_with_callback(std::move(net_query), actor_shared(this, token_type)); diff --git a/td/telegram/Version.h b/td/telegram/Version.h index 5bd39c77..da53d25b 100644 --- a/td/telegram/Version.h +++ b/td/telegram/Version.h @@ -8,7 +8,7 @@ namespace td { -constexpr int32 MTPROTO_LAYER = 102; +constexpr int32 MTPROTO_LAYER = 103; enum class Version : int32 { Initial,