Support age verification for sensitive media.

This commit is contained in:
John Preston
2025-07-21 16:47:41 +04:00
parent fee892f9a2
commit ccb8c43961
16 changed files with 416 additions and 56 deletions
@@ -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)) {