diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 2c7cb663..01af157f 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3465,7 +3465,8 @@ deleteLanguagePack language_pack_id:string = Ok; //@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token Device token @other_user_ids List of at most 100 user identifiers of other users currently using the client registerDevice device_token:DeviceToken other_user_ids:vector = PushReceiverId; -//@description Handles a push notification. Can be called before authorization @payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added +//@description Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization +//@payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added processPushNotification payload:string = Ok; //@description Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. This is an offline method. Can be called before authorization. Can be called synchronously @payload JSON-encoded push notification payload diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index a3804f9d..4076e30f 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -2977,12 +2977,12 @@ Status NotificationManager::process_push_notification_payload(string payload) { if (begins_with(loc_key, "ENCRYPTION_")) { // TODO new secret chat notifications - return Status::OK(); + return Status::Error(406, "New secret chat notification is not supported"); } if (begins_with(loc_key, "PHONE_CALL_")) { // TODO phone call request/missed notification - return Status::OK(); + return Status::Error(406, "Phone call notification is not supported"); } loc_key = convert_loc_key(loc_key);