Changeset - 5e0208ef296b
[Not reviewed]
0 3 0
Darchigh - 13 years ago 2013-01-10 14:24:54
Darchigh@gmail.com
fixed bad formatting
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/userregistration.cpp
Show inline comments
 
@@ -71,24 +71,25 @@ bool UserRegistration::unregisterUser(const std::string &barejid) {
 
	if (!registered)
 
		return false;
 

	
 
	onUserUnregistered(userInfo);
 

	
 
	// We have to check if server supports remoteroster XEP and use it if it's supported or fallback to unsubscribe otherwise
 
	AddressedRosterRequest::ref request = AddressedRosterRequest::ref(new AddressedRosterRequest(m_component->getIQRouter(), barejid));
 
	request->onResponse.connect(boost::bind(&UserRegistration::handleUnregisterRemoteRosterResponse, this, _1, _2, barejid));
 
	request->send();
 

	
 
	return true;
 
}
 

	
 
void UserRegistration::handleRegisterRemoteRosterResponse(boost::shared_ptr<Swift::RosterPayload> payload, Swift::ErrorPayload::ref remoteRosterNotSupported /*error*/, const UserInfo &row){
 
    if (remoteRosterNotSupported || !payload) {     
 
	Swift::Presence::ref response = Swift::Presence::create();
 
	response->setFrom(m_component->getJID());
 
	response->setTo(Swift::JID(row.jid));
 
	response->setType(Swift::Presence::Subscribe);
 
	m_component->getStanzaChannel()->sendPresence(response);
 
    }
 
    else{
 
        Swift::RosterPayload::ref payload = Swift::RosterPayload::ref(new Swift::RosterPayload());
 
        Swift::RosterItemPayload item;
 
        item.setJID(m_component->getJID());
0 comments (0 inline, 0 general)