2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Disable ownership transfer to myself.

This commit is contained in:
John Preston
2019-07-04 14:02:25 +02:00
parent 58d4b763b6
commit b96b801b22

View File

@@ -381,7 +381,7 @@ void EditAdminBox::prepare() {
}
bool EditAdminBox::canTransferOwnership() const {
if (user()->isInaccessible() || user()->isBot()) {
if (user()->isInaccessible() || user()->isBot() || user()->isSelf()) {
return false;
} else if (const auto chat = peer()->asChat()) {
return chat->amCreator();