2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

context bot resolve done

This commit is contained in:
John Preston
2015-12-29 01:06:27 +03:00
parent 77228d358d
commit 820339d390
9 changed files with 74 additions and 18 deletions

View File

@@ -424,6 +424,7 @@ namespace App {
data->setBotInfoVersion(d.vbot_info_version.v);
data->botInfo->readsAllHistory = d.is_bot_chat_history();
data->botInfo->cantJoinGroups = d.is_bot_nochats();
data->botInfo->contextPlaceholder = d.has_bot_context_placeholder() ? qs(d.vbot_context_placeholder) : QString();
} else {
data->setBotInfoVersion(-1);
}
@@ -1430,8 +1431,8 @@ namespace App {
return ::self;
}
PeerData *peerByName(const QStringRef &username) {
QStringRef uname(username.trimmed());
PeerData *peerByName(const QString &username) {
QString uname(username.trimmed());
for (PeersData::const_iterator i = peersData.cbegin(), e = peersData.cend(); i != e; ++i) {
if (!i.value()->userName().compare(uname, Qt::CaseInsensitive)) {
return i.value()->asUser();