Changeset - 8e99da692bc9
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-07-29 11:48:37
hanzz.k@gmail.com
Ignore message type='error'
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/usermanager.cpp
Show inline comments
 
@@ -299,26 +299,30 @@ void UserManager::handleRemoveTimeout(const std::string jid, User *u, bool recon
 
	// Remove user
 
	if (user) {
 
		removeUser(user);
 
	}
 

	
 
	// Connect the user again when we're reconnecting.
 
	if (reconnect) {
 
		connectUser(jid);
 
	}
 
}
 

	
 
void UserManager::handleMessageReceived(Swift::Message::ref message) {
 
	if (message->getType() == Swift::Message::Error) {
 
		return;
 
	}
 

	
 
	User *user = getUser(message->getFrom().toBare().toString());
 
	if (!user ){
 
	if (!user){
 
		return;
 
	}
 

	
 
	user->getConversationManager()->handleMessageReceived(message);
 

	
 
	// Do not count chatstate notification...
 
	boost::shared_ptr<Swift::ChatState> statePayload = message->getPayload<Swift::ChatState>();
 
	if (!statePayload) {
 
		messageToBackendSent();
 
	}
 
}
 

	
0 comments (0 inline, 0 general)