diff --git a/libtransport/Conversation.cpp b/libtransport/Conversation.cpp index c10307737bc27e54d1e3001d94e50c840f862259..56f6101803ced23111dc8ee33a75b0b8d32f6e4c 100644 --- a/libtransport/Conversation.cpp +++ b/libtransport/Conversation.cpp @@ -251,13 +251,13 @@ void Conversation::sendParticipants(const Swift::JID &to, const std::string &nic presence->setTo(to); m_conversationManager->getComponent()->getFrontend()->sendPresence(presence); - // And send the presence from as new user - m_nickname = tmp; - presence = generatePresence(m_nickname, 0, (int) Swift::StatusShow::Online, "", "", ""); - presence->setTo(to); - m_conversationManager->getComponent()->getFrontend()->sendPresence(presence); } + // Self presence has to be sent as first. + Swift::Presence::ref presence = generatePresence(m_nickname, 0, (int) Swift::StatusShow::Online, "", "", ""); + presence->setTo(to); + m_conversationManager->getComponent()->getFrontend()->sendPresence(presence); + for (std::map::iterator it = m_participants.begin(); it != m_participants.end(); it++) { (*it).second.presence->setTo(to); m_conversationManager->getComponent()->getFrontend()->sendPresence((*it).second.presence);