diff --git a/src/user.cpp b/src/user.cpp index 7b3ba23730ca9f8324dd33294f594d138a11416e..2cf74cbd1c38a2c1369d0d4459380c015613f2fb 100644 --- a/src/user.cpp +++ b/src/user.cpp @@ -111,6 +111,19 @@ Swift::JID User::getJIDWithFeature(const std::string &feature) { return jid; } +Swift::DiscoInfo::ref User::getCaps(const Swift::JID &jid) const { + Swift::DiscoInfo::ref discoInfo = m_entityCapsManager->getCaps(jid); +#ifdef SUPPORT_LEGACY_CAPS + if (!discoInfo) { + std::map::const_iterator it = m_legacyCaps.find(jid); + if (it != m_legacyCaps.end()) { + discoInfo = it->second; + } + } +#endif + return discoInfo; +} + void User::sendCurrentPresence() { if (m_component->inServerMode()) { return;