mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-28 16:29:53 +00:00
Support age verification for sensitive media.
This commit is contained in:
@@ -1399,6 +1399,9 @@ UserData *Session::userByPhone(const QString &phone) const {
|
||||
|
||||
PeerData *Session::peerByUsername(const QString &username) const {
|
||||
const auto uname = username.trimmed();
|
||||
if (uname.isEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
for (const auto &[peerId, peer] : _peers) {
|
||||
if (peer->isLoaded()
|
||||
&& !peer->username().compare(uname, Qt::CaseInsensitive)) {
|
||||
|
||||
Reference in New Issue
Block a user