Changeset - 8c7caaf94a3f
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-11-13 17:52:51
hanzz.k@gmail.com
send subscribe presence as response to error presence only when error type is SubscriptionRequested
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/usermanager.cpp
Show inline comments
 
@@ -431,6 +431,15 @@ void UserManager::handleErrorPresence(Swift::Presence::ref presence) {
 
	if (!presence->getTo().getNode().empty()) {
 
		return;
 
	}
 

	
 
	if (!presence->getPayload<Swift::ErrorPayload>()) {
 
		return;
 
	}
 

	
 
	if (presence->getPayload<Swift::ErrorPayload>()->getCondition() != Swift::ErrorPayload::SubscriptionRequired) {
 
		return;
 
	}
 

	
 
	std::string userkey = presence->getFrom().toBare().toString();
 
	UserInfo res;
 
	bool registered = m_storageBackend ? m_storageBackend->getUser(userkey, res) : false;
0 comments (0 inline, 0 general)