2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Edit join public group request requirement.

This commit is contained in:
John Preston
2022-04-15 20:57:03 +04:00
parent a752c4d9f3
commit c3386fba52
8 changed files with 275 additions and 89 deletions

View File

@@ -52,6 +52,8 @@ enum class ChannelDataFlag {
HasLink = (1 << 18),
SlowmodeEnabled = (1 << 19),
NoForwards = (1 << 20),
JoinToWrite = (1 << 21),
RequestToJoin = (1 << 22),
};
inline constexpr bool is_flag_type(ChannelDataFlag) { return true; };
using ChannelDataFlags = base::flags<ChannelDataFlag>;
@@ -255,6 +257,12 @@ public:
[[nodiscard]] bool amCreator() const {
return flags() & Flag::Creator;
}
[[nodiscard]] bool joinToWrite() const {
return flags() & Flag::JoinToWrite;
}
[[nodiscard]] bool requestToJoin() const {
return flags() & Flag::RequestToJoin;
}
[[nodiscard]] auto adminRights() const {
return _adminRights.current();