diff --git a/src/gatewayresponder.cpp b/src/gatewayresponder.cpp index c7cbee99bb5eb7083a61e34826caf7a2ea06ae06..5a2683123ddf39c4f3ce4d46f357ac919327782c 100644 --- a/src/gatewayresponder.cpp +++ b/src/gatewayresponder.cpp @@ -54,8 +54,15 @@ bool GatewayResponder::handleGetRequest(const Swift::JID& from, const Swift::JID bool GatewayResponder::handleSetRequest(const Swift::JID& from, const Swift::JID& to, const std::string& id, boost::shared_ptr payload) { std::string prompt = payload->getPrompt(); std::string escaped = Swift::JID::getEscapedNode(prompt); + // This code is here to workaround Gajim (and probably other clients bug too) bug + // https://trac.gajim.org/ticket/7277 + if (prompt.find("\\40") != std::string::npos) { + LOG4CXX_WARN(logger, from.toString() << " Received already escaped JID " << prompt << ". Not escaping again."); + escaped = prompt; + } + std::string jid = escaped + "@" + m_userManager->getComponent()->getJID().toBare().toString(); - + sendResponse(from, id, boost::shared_ptr(new GatewayPayload(jid))); return true; }