forked from blue/squawk
first ever received and cached client data!
This commit is contained in:
parent
037dabbe06
commit
c50cd1140e
11 changed files with 297 additions and 60 deletions
|
@ -634,16 +634,16 @@ void Core::Account::onDiscoveryInfoReceived(const QXmppDiscoveryIq& info)
|
|||
QString node = info.queryNode();
|
||||
if (!node.isEmpty()) {
|
||||
QStringList feats = info.features();
|
||||
std::list<Shared::Identity> identities;
|
||||
std::set<Shared::Identity> identities;
|
||||
std::set<QString> features(feats.begin(), feats.end());
|
||||
QList<QXmppDiscoveryIq::Identity> idents = info.identities();
|
||||
for (const QXmppDiscoveryIq::Identity& ident : idents) {
|
||||
identities.emplace_back();
|
||||
Shared::Identity& identity = identities.back();
|
||||
Shared::Identity identity;
|
||||
identity.category = ident.category();
|
||||
identity.language = ident.language();
|
||||
identity.name = ident.name();
|
||||
identity.type = ident.type();
|
||||
identities.insert(identity);
|
||||
|
||||
qDebug() << " " << identity.name << identity.category << identity.type;
|
||||
}
|
||||
|
@ -655,6 +655,16 @@ void Core::Account::onDiscoveryInfoReceived(const QXmppDiscoveryIq& info)
|
|||
}
|
||||
}
|
||||
|
||||
void Core::Account::discoverInfo(const QString& address, const QString& node) {
|
||||
if (state == Shared::ConnectionState::connected) {
|
||||
dm->requestInfo(address, node);
|
||||
} else {
|
||||
qDebug() << "An attempt to send a discover info by account" << name <<
|
||||
"sending request to" << address << "about node" << node <<
|
||||
"but the account is not in the connected state, skipping";
|
||||
}
|
||||
}
|
||||
|
||||
void Core::Account::handleDisconnection()
|
||||
{
|
||||
cm->setCarbonsEnabled(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue