mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Respect appconfig starref restrictions.
This commit is contained in:
@@ -1242,7 +1242,9 @@ void Controller::fillManageSection() {
|
||||
&& (channel->isBroadcast() || channel->isGigagroup());
|
||||
const auto hasRecentActions = isChannel
|
||||
&& (channel->hasAdminRights() || channel->amCreator());
|
||||
const auto hasStarRef = isChannel && channel->canPostMessages();
|
||||
const auto hasStarRef = Info::BotStarRef::Join::Allowed(_peer)
|
||||
&& isChannel
|
||||
&& channel->canPostMessages();
|
||||
const auto canEditStickers = isChannel && channel->canEditStickers();
|
||||
const auto canDeleteChannel = isChannel && channel->canDelete();
|
||||
const auto canEditColorIndex = isChannel && channel->canEditEmoji();
|
||||
@@ -1730,6 +1732,10 @@ void Controller::fillBotCreditsButton() {
|
||||
void Controller::fillBotAffiliateProgram() {
|
||||
Expects(_isBot);
|
||||
|
||||
if (!Info::BotStarRef::Setup::Allowed(_peer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto user = _peer->asUser();
|
||||
auto label = user->session().changes().peerFlagsValue(
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user