CAMEL-14194: Message thread name removed from JID (#3351)
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java
index 4bf2197..88a0dda 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java
@@ -79,7 +79,7 @@
message.setType(Message.Type.normal);
ChatManager chatManager = ChatManager.getInstanceFor(connection);
- Chat chat = getOrCreateChat(chatManager, participant, thread);
+ Chat chat = getOrCreateChat(chatManager, participant);
endpoint.getBinding().populateXmppMessage(message, exchange);
@@ -93,9 +93,9 @@
}
}
- private Chat getOrCreateChat(ChatManager chatManager, final String participant, String thread) throws XmppStringprepException {
+ private Chat getOrCreateChat(ChatManager chatManager, final String participant) throws XmppStringprepException {
// this starts a new chat or retrieves the pre-existing one in a threadsafe manner
- return chatManager.chatWith(JidCreate.entityBareFrom(participant + "@" + thread));
+ return chatManager.chatWith(JidCreate.entityBareFrom(participant));
}
private synchronized void reconnect() throws InterruptedException, IOException, SmackException, XMPPException {