mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 09:38:57 +01:00
Properly update database on updateUserName
This commit is contained in:
parent
a6a64d608a
commit
c0e742f147
@ -640,7 +640,7 @@ trait PeerHandler
|
||||
$this->logger->logger($e);
|
||||
}
|
||||
if (isset($dbres['ok']) && $dbres['ok']) {
|
||||
yield from $this->resolveUsername('@'.$dbres['result']);
|
||||
yield from $this->resolveUsername($dbres['result']);
|
||||
return yield from $this->getInfo($id, $type, false);
|
||||
}
|
||||
}
|
||||
|
@ -291,6 +291,9 @@ trait UpdateHandler
|
||||
yield from $this->getConfig();
|
||||
}
|
||||
if (\in_array($update['_'], ['updateUserName', 'updateUserPhone', 'updateUserBlocked', 'updateUserPhoto', 'updateContactRegistered', 'updateContactLink']) && $this->getSettings()->getDb()->getEnableFullPeerDb()) {
|
||||
if ($update['_'] === 'updateUserName') {
|
||||
$update = yield from $this->resolveUsername($update['username'])['peer'];
|
||||
}
|
||||
$id = $this->getId($update);
|
||||
$chat = yield $this->full_chats[$id];
|
||||
$chat['last_update'] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user