Add BusinessConnectionManager::check_business_connection_id.
This commit is contained in:
parent
4bc3b380b8
commit
0a703fb8c2
@ -90,6 +90,13 @@ void BusinessConnectionManager::tear_down() {
|
||||
parent_.reset();
|
||||
}
|
||||
|
||||
Status BusinessConnectionManager::check_business_connection_id(const string &connection_id) const {
|
||||
if (connection_id.empty() || business_connections_.count(connection_id) != 0) {
|
||||
return Status::OK();
|
||||
}
|
||||
return Status::Error(400, "Business connection not found");
|
||||
}
|
||||
|
||||
void BusinessConnectionManager::on_update_bot_business_connect(
|
||||
telegram_api::object_ptr<telegram_api::botBusinessConnection> &&connection) {
|
||||
CHECK(connection != nullptr);
|
||||
|
@ -29,6 +29,8 @@ class BusinessConnectionManager final : public Actor {
|
||||
BusinessConnectionManager &operator=(BusinessConnectionManager &&) = delete;
|
||||
~BusinessConnectionManager() final;
|
||||
|
||||
Status check_business_connection_id(const string &connection_id) const;
|
||||
|
||||
void on_update_bot_business_connect(telegram_api::object_ptr<telegram_api::botBusinessConnection> &&connection);
|
||||
|
||||
void get_business_connection(const string &connection_id,
|
||||
|
Loading…
Reference in New Issue
Block a user