diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 2018d2e1..68e30432 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3562,7 +3562,7 @@ setCustomLanguagePackString language_pack_id:string new_string:languagePackStrin 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 +//@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 user identifiers of other users currently using the client registerDevice device_token:DeviceToken other_user_ids:vector = PushReceiverId; //@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 diff --git a/td/telegram/DeviceTokenManager.cpp b/td/telegram/DeviceTokenManager.cpp index dec7ddd5..56ad973e 100644 --- a/td/telegram/DeviceTokenManager.cpp +++ b/td/telegram/DeviceTokenManager.cpp @@ -228,9 +228,6 @@ void DeviceTokenManager::register_device(tl_object_ptr devi return promise.set_error(Status::Error(400, "Invalid user_id among other user_ids")); } } - if (other_user_ids.size() > MAX_OTHER_USER_IDS) { - return promise.set_error(Status::Error(400, "Too much other user_ids")); - } auto &info = tokens_[token_type]; info.net_query_id = 0; diff --git a/td/telegram/DeviceTokenManager.h b/td/telegram/DeviceTokenManager.h index 1cbe6083..e03e338e 100644 --- a/td/telegram/DeviceTokenManager.h +++ b/td/telegram/DeviceTokenManager.h @@ -32,8 +32,6 @@ class DeviceTokenManager : public NetQueryCallback { vector> get_encryption_keys() const; private: - static constexpr size_t MAX_OTHER_USER_IDS = 100; - ActorShared<> parent_; enum TokenType : int32 { APNS = 1,