1
0
Fork 0
forked from blue/squawk

Renaming contacts in roster, set 2 reconnects by default

This commit is contained in:
Blue 2019-10-01 11:47:40 +03:00
parent 415d56ba69
commit 475a12c28e
7 changed files with 52 additions and 2 deletions

View file

@ -1200,3 +1200,14 @@ void Core::Account::removeContactFromGroupRequest(const QString& jid, const QStr
}
}
}
void Core::Account::renameContactRequest(const QString& jid, const QString& newName)
{
std::map<QString, Contact*>::const_iterator itr = contacts.find(jid);
if (itr == contacts.end()) {
qDebug() << "An attempt to rename non existing contact" << jid << "of account" << name << ", skipping";
} else {
QXmppRosterManager& rm = client.rosterManager();
rm.renameItem(jid, newName);
}
}