forked from blue/squawk
better new message handling, subscription with adding new contact, out of roster contacts handling
This commit is contained in:
parent
bb509be29a
commit
b2699e0087
11 changed files with 100 additions and 23 deletions
|
@ -556,3 +556,13 @@ void Models::Roster::removeAccount(const QString& account)
|
|||
|
||||
acc->deleteLater();
|
||||
}
|
||||
|
||||
QString Models::Roster::getContactName(const QString& account, const QString& jid)
|
||||
{
|
||||
std::multimap<ElId, Contact*>::const_iterator cItr = contacts.find({account, jid});
|
||||
if (cItr == contacts.end()) {
|
||||
qDebug() << "An attempt to get a name of non existing contact " << account << ":" << jid << ", skipping";
|
||||
return "";
|
||||
}
|
||||
return cItr->second->getContactName();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue