tdlight/td/telegram/DialogFilterInviteLink.h

51 lines
1.5 KiB
C
Raw Normal View History

2023-03-24 15:06:09 +01:00
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
//
// 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/DialogId.h"
#include "td/telegram/td_api.h"
#include "td/telegram/telegram_api.h"
#include "td/utils/common.h"
#include "td/utils/Slice.h"
#include "td/utils/StringBuilder.h"
namespace td {
class Td;
class DialogFilterInviteLink {
string invite_link_;
string title_;
vector<DialogId> dialog_ids_;
friend bool operator==(const DialogFilterInviteLink &lhs, const DialogFilterInviteLink &rhs);
friend StringBuilder &operator<<(StringBuilder &string_builder, const DialogFilterInviteLink &invite_link);
public:
DialogFilterInviteLink() = default;
DialogFilterInviteLink(Td *td, telegram_api::object_ptr<telegram_api::exportedChatlistInvite> exported_invite);
2023-04-03 16:28:51 +02:00
td_api::object_ptr<td_api::chatFolderInviteLink> get_chat_folder_invite_link_object() const;
2023-03-24 15:06:09 +01:00
bool is_valid() const {
return !invite_link_.empty();
}
static bool is_valid_invite_link(Slice invite_link);
2023-03-24 15:06:09 +01:00
};
bool operator==(const DialogFilterInviteLink &lhs, const DialogFilterInviteLink &rhs);
bool operator!=(const DialogFilterInviteLink &lhs, const DialogFilterInviteLink &rhs);
StringBuilder &operator<<(StringBuilder &string_builder, const DialogFilterInviteLink &invite_link);
} // namespace td