This commit is contained in:
Vitaly Takmazov 2013-06-14 12:49:25 +04:00
commit 95e56435ff
2 changed files with 6 additions and 1 deletions

View file

@ -594,6 +594,7 @@ std::string TwitterPlugin::getMostRecentDMIDUnsafe(const std::string user) {
}
}
}
return ID;
}
std::string TwitterPlugin::getMostRecentDMID(const std::string user)

View file

@ -1077,7 +1077,11 @@ void NetworkPluginServer::handleElement(boost::shared_ptr<Swift::Element> elemen
}
else {
Swift::Presence::ref highest = m_component->getPresenceOracle()->getHighestPriorityPresence(user->getJID());
iq->setTo(highest->getFrom());
if (highest) {
iq->setTo(highest->getFrom());
} else {
iq->setTo(user->getJID());
}
}
m_component->getIQRouter()->sendIQ(iq);
return;