From 06831c28369e17bc747c887a9aff6984906328c3 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 6 Mar 2024 15:11:16 +0300 Subject: [PATCH] Return null as businessInfo if empty. --- td/telegram/BusinessInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/BusinessInfo.cpp b/td/telegram/BusinessInfo.cpp index 9cf379aae..de9723fd3 100644 --- a/td/telegram/BusinessInfo.cpp +++ b/td/telegram/BusinessInfo.cpp @@ -9,6 +9,9 @@ namespace td { td_api::object_ptr BusinessInfo::get_business_info_object(Td *td) const { + if (is_empty()) { + return nullptr; + } return td_api::make_object(location_.get_business_location_object(), work_hours_.get_business_opening_hours_object(), greeting_message_.get_business_greeting_message_settings_object(td),