// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once #include "td/telegram/MessageEntity.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/utils/common.h" #include "td/utils/StringBuilder.h" namespace td { class UserManager; class BusinessChatLink { string link_; FormattedText text_; string title_; int32 view_count_ = 0; friend StringBuilder &operator<<(StringBuilder &string_builder, const BusinessChatLink &link); public: BusinessChatLink(const UserManager *user_manager, telegram_api::object_ptr &&link); bool is_valid() const { return !link_.empty(); } td_api::object_ptr get_business_chat_link_object() const; }; StringBuilder &operator<<(StringBuilder &string_builder, const BusinessChatLink &link); class BusinessChatLinks { vector business_chat_links_; friend StringBuilder &operator<<(StringBuilder &string_builder, const BusinessChatLinks &links); public: explicit BusinessChatLinks(const UserManager *user_manager, vector> &&links); td_api::object_ptr get_business_chat_links_object() const; }; StringBuilder &operator<<(StringBuilder &string_builder, const BusinessChatLinks &links); } // namespace td