Skip to content

Commit de17127

Browse files
committed
Explicitly set can_manage_community for administrators.
1 parent 0f8f8ee commit de17127

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

td/telegram/DialogParticipant.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ AdministratorRights::AdministratorRights(const telegram_api::object_ptr<telegram
2525
return;
2626
}
2727

28-
if (!rights->other_) {
29-
LOG(ERROR) << "Receive wrong other flag in " << to_string(rights);
28+
auto other = rights->other_;
29+
if (!other) {
30+
if (channel_type == ChannelType::Unknown) {
31+
other = true;
32+
} else {
33+
LOG(ERROR) << "Receive wrong other flag in " << to_string(rights);
34+
}
3035
}
31-
*this = AdministratorRights(rights->anonymous_, rights->other_, rights->change_info_, rights->post_messages_,
36+
*this = AdministratorRights(rights->anonymous_, other, rights->change_info_, rights->post_messages_,
3237
rights->edit_messages_, rights->delete_messages_, rights->invite_users_,
3338
rights->ban_users_, rights->pin_messages_, rights->manage_topics_, rights->add_admins_,
3439
rights->manage_call_, rights->post_stories_, rights->edit_stories_,

0 commit comments

Comments
 (0)