Changeset - 581217137292
[Not reviewed]
0 1 0
Jan Kaluza - 13 years ago 2012-10-22 17:20:47
hanzz.k@gmail.com
Do not create conversation when the message contain nickname, because that means the conversation should be MUC, but user didn't connect to that room yet
1 file changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -633,8 +633,16 @@ void NetworkPluginServer::handleConvMessagePayload(const std::string &data, bool
 
		msg->addPayload(boost::make_shared<Swift::Delay>(timestamp));
 
	}
 

	
 
	// Create new Conversation if it does not exist
 
	</i>
 
	NetworkConversation *conv = (NetworkConversation *) user->getConversationManager()->getConversation(payload.buddyname());
 

	
 
	// We can't create Conversation for payload with nickname, because this means the message is from room,
 
	// but this user is not in any room, so it's OK to just reject this message
 
	if (!conv && !payload.nickname().empty()) {
 
		return;
 
	}
 

	
 
	// Create new Conversation if it does not exist
 
	if (!conv) {
 
		conv = new NetworkConversation(user->getConversationManager(), payload.buddyname());
 
		user->getConversationManager()->addConversation(conv);
0 comments (0 inline, 0 general)