mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 00:36:53 +00:00
Fix opening t.me/channel with min-loaded channels.
This commit is contained in:
parent
30c73fbdf2
commit
06e49c6813
@ -1158,7 +1158,8 @@ UserData *Session::userByPhone(const QString &phone) const {
|
||||
PeerData *Session::peerByUsername(const QString &username) const {
|
||||
const auto uname = username.trimmed();
|
||||
for (const auto &[peerId, peer] : _peers) {
|
||||
if (!peer->userName().compare(uname, Qt::CaseInsensitive)) {
|
||||
if (peer->isLoaded()
|
||||
&& !peer->userName().compare(uname, Qt::CaseInsensitive)) {
|
||||
return peer.get();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user