diff --git a/libtransport/Conversation.cpp b/libtransport/Conversation.cpp index 24df395858e30c3ef06e638382b97f882de26739..08c57be692394f3eefc16f2e270866b8e35a03b9 100644 --- a/libtransport/Conversation.cpp +++ b/libtransport/Conversation.cpp @@ -61,6 +61,7 @@ void Conversation::destroyRoom() { if (legacyName.find_last_of("@") != std::string::npos) { legacyName.replace(legacyName.find_last_of("@"), 1, "%"); // OK } + legacyName = Swift::JID::getEscapedNode(legacyName); presence->setFrom(Swift::JID(legacyName, m_conversationManager->getComponent()->getJID().toBare(), m_nickname)); presence->setType(Swift::Presence::Unavailable); @@ -182,6 +183,7 @@ void Conversation::handleMessage(boost::shared_ptr &message, con if (legacyName.find_last_of("@") != std::string::npos) { legacyName.replace(legacyName.find_last_of("@"), 1, "%"); // OK } + legacyName = Swift::JID::getEscapedNode(legacyName); message->setFrom(Swift::JID(legacyName, m_conversationManager->getComponent()->getJID().toBare(), n)); } } @@ -191,6 +193,7 @@ void Conversation::handleMessage(boost::shared_ptr &message, con if (legacyName.find_last_of("@") != std::string::npos) { legacyName.replace(legacyName.find_last_of("@"), 1, "%"); // OK } + legacyName = Swift::JID::getEscapedNode(legacyName); std::string n = nickname; if (n.empty()) { @@ -251,6 +254,7 @@ Swift::Presence::ref Conversation::generatePresence(const std::string &nick, int if (legacyName.find_last_of("@") != std::string::npos) { legacyName.replace(legacyName.find_last_of("@"), 1, "%"); // OK } + legacyName = Swift::JID::getEscapedNode(legacyName); } presence->setFrom(Swift::JID(legacyName, m_conversationManager->getComponent()->getJID().toBare(), nickname)); presence->setType(Swift::Presence::Available);