mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 17:15:16 +00:00
search channel by username
This commit is contained in:
@@ -104,6 +104,8 @@ void PeerData::updateName(const QString &newName, const QString &newNameOrPhone,
|
||||
if (isUser()) {
|
||||
asUser()->username = newUsername;
|
||||
asUser()->setNameOrPhone(newNameOrPhone);
|
||||
} else if (isChannel()) {
|
||||
asChannel()->username = newUsername;
|
||||
}
|
||||
|
||||
Names oldNames = names;
|
||||
@@ -154,6 +156,8 @@ void PeerData::fillNames() {
|
||||
if (isUser()) {
|
||||
if (!asUser()->nameOrPhone.isEmpty() && asUser()->nameOrPhone != name) toIndex += ' ' + textAccentFold(asUser()->nameOrPhone);
|
||||
if (!asUser()->username.isEmpty()) toIndex += ' ' + textAccentFold(asUser()->username);
|
||||
} else if (isChannel()) {
|
||||
if (!asChannel()->username.isEmpty()) toIndex += ' ' + textAccentFold(asChannel()->username);
|
||||
}
|
||||
if (cRussianLetters().match(toIndex).hasMatch()) {
|
||||
toIndex += ' ' + translitRusEng(toIndex);
|
||||
|
Reference in New Issue
Block a user