Merge pull request #21 from darchigh/master
Remote-Roster Push depending on getRoster-Payload
This commit is contained in:
commit
1a9808a615
1 changed files with 9 additions and 0 deletions
|
@ -280,6 +280,15 @@ void RosterManager::handleRemoteRosterResponse(boost::shared_ptr<Swift::RosterPa
|
|||
|
||||
LOG4CXX_INFO(logger, m_user->getJID().toString() << ": This server supports remote roster protoXEP");
|
||||
m_supportRemoteRoster = true;
|
||||
|
||||
//If we receive empty RosterPayload on login (not register) initiate full RosterPush
|
||||
if(!m_buddies.empty() && payload->getItems().empty()){
|
||||
LOG4CXX_INFO(logger, "Received empty Roster upon login. Pushing full Roster.");
|
||||
for(std::map<std::string, Buddy *, std::less<std::string>, boost::pool_allocator< std::pair<std::string, Buddy *> > >::const_iterator c_it = m_buddies.begin();
|
||||
c_it != m_buddies.end(); c_it++) {
|
||||
sendBuddyRosterPush(c_it->second);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
BOOST_FOREACH(const Swift::RosterItemPayload &item, payload->getItems()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue