mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix opening t.me/channel with min-loaded channels.
This commit is contained in:
parent
30c73fbdf2
commit
06e49c6813
1 changed files with 2 additions and 1 deletions
|
@ -1158,7 +1158,8 @@ UserData *Session::userByPhone(const QString &phone) const {
|
||||||
PeerData *Session::peerByUsername(const QString &username) const {
|
PeerData *Session::peerByUsername(const QString &username) const {
|
||||||
const auto uname = username.trimmed();
|
const auto uname = username.trimmed();
|
||||||
for (const auto &[peerId, peer] : _peers) {
|
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();
|
return peer.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue