camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "martin scharm (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-9847) XMPP: private chat response issue
Date Sat, 09 Apr 2016 10:40:25 GMT
martin scharm created CAMEL-9847:
------------------------------------

             Summary: XMPP: private chat response issue
                 Key: CAMEL-9847
                 URL: https://issues.apache.org/jira/browse/CAMEL-9847
             Project: Camel
          Issue Type: Bug
          Components: camel-xmpp
    Affects Versions: 2.17.0, 2.18.0
         Environment: jdk1.8.0_65
            Reporter: martin scharm


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

{code:java}
String participant = exchange.getIn().getHeader(XmppConstants.TO, String.class);
{code}
(see https://github.com/apache/camel/blob/4ad8bcfde6ba931e526cd8680e211a397c6c71e7/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java#L68)


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

{code:java}
message.setTo(participant);
{code}
(see https://github.com/apache/camel/blob/4ad8bcfde6ba931e526cd8680e211a397c6c71e7/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java#L82)

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message