camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CAMEL-9847) XMPP: private chat response issue
Date Sat, 09 Apr 2016 10:44:25 GMT


ASF GitHub Bot commented on CAMEL-9847:

GitHub user binfalse opened a pull request:

     camel-xmpp: fix private chat response issue 

    This fixes the issue with XMPP private chat responses, see

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #938
commit cbada76346fa0aae74128b2b74aa3a834144ea63
Author: Martin Scharm <>
Date:   2016-04-09T09:53:12Z

    camel-xmpp: fix private chat response issue
    Responding to a private chat wasn't able because the message was always sent to
        String participant = exchange.getIn().getHeader(XmppConstants.TO, String.class);
    However, the `XmppConstants.TO` in such messages is the camel instance
    (which received the message) and not the chat's other participant.
    Thus, responding to a chat message always resultet in a message to itself.
    This patch fixes that issue and addresses messages always to
        String participant = endpoint.getParticipant();

commit cb1b8f6337c4795fc9d5046c204ff1e5dc86d533
Author: Martin Scharm <>
Date:   2016-04-09T10:05:03Z

    Merge branch 'master' of


> XMPP: private chat response issue
> ---------------------------------
>                 Key: CAMEL-9847
>                 URL:
>             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
> {code:java}
> String participant = exchange.getIn().getHeader(XmppConstants.TO, String.class);
> {code}
> (see
> 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
> 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
by using the {{endpoint.getParticipant()}} to set the receipient of the message.

This message was sent by Atlassian JIRA

View raw message