Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.17.0
-
None
-
jdk1.8.0_65
-
Patch Available
-
Unknown
Description
There is an issue in the org.apache.camel.component.xmpp.XmppPrivateChatProducer that prevents responding to XMPP private chat messages. The participant's address is obtained as
String participant = exchange.getIn().getHeader(XmppConstants.TO, String.class);
In case of an incoming message that is the camel instance itself, not the participant. However, from that it creates the outgoing message just as
message.setTo(participant);
Thus, responding to a chat message always results in a message to itself and not the chat's other participant.
I fixed the issue in https://github.com/binfalse/camel/commit/cbada76346fa0aae74128b2b74aa3a834144ea63 by using the endpoint.getParticipant() to set the receipient of the message. Based on that I created a pull request on github: https://github.com/apache/camel/pull/938