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] [Commented] (CAMEL-9847) XMPP: private chat response issue
Date Sat, 09 Apr 2016 23:27:25 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15233778#comment-15233778
] 

martin scharm commented on CAMEL-9847:
--------------------------------------

Just for references:
I stumbled upon this issue a week ago and created CAMEL-9804. But after I didn't receive a
reply on the mailing list (https://mail-archives.apache.org/mod_mbox/camel-users/201604.mbox/%3C5703E694.7060208%40binfalse.de%3E),
I started to investigate the issue myself and created the above mentioned patch and pull request.

> 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. Based on
that I created a pull request on github: https://github.com/apache/camel/pull/938



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

Mime
View raw message