Changeset - 2ca447264ae8
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-02-17 17:52:16
jkaluza@redhat.com
Libtransport: Debug message for Conversation::sendParticipants
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
libtransport/Conversation.cpp
Show inline comments
 
@@ -225,24 +225,25 @@ void Conversation::handleMessage(boost::shared_ptr<Swift::Message> &message, con
 
std::string Conversation::getParticipants() {
 
	std::string ret;
 
	for (std::map<std::string, Participant>::iterator it = m_participants.begin(); it != m_participants.end(); it++) {
 
		ret += (*it).second.presence->getFrom().getResource() + ", ";
 
	}
 
	return ret;
 
}
 

	
 
void Conversation::sendParticipants(const Swift::JID &to, const std::string &nickname) {
 
	// When user tries to join this room from another resource using
 
	// different nickname than the original one has, we have to rename
 
	// him.
 
	LOG4CXX_INFO(logger, m_jid.toString() << ": Sending participants to " << to.toString() << ", Nickname:" << nickname << ", Conversation nickname:" << m_nickname);
 
	if (m_nickname != nickname && !nickname.empty()) {
 
		Swift::Presence::ref presence;
 
		std::string tmp = m_nickname;
 

	
 
		// At first connect the user.
 
		m_nickname = nickname;
 
		presence = generatePresence(nickname, 0, (int) Swift::StatusShow::Online, "", "", "");
 
		presence->setTo(to);
 
		m_conversationManager->getComponent()->getFrontend()->sendPresence(presence);
 

	
 
		// Now change his nickname to the right one.
 
		m_nicknameChanged = true;
0 comments (0 inline, 0 general)