Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-712

Xmpp private chat does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4.0
    • 1.4.0
    • None
    • None
    • xmpp sender: xmpp camel component; account @gmail.com
      xmpp receiver: Psi version 0.11; account @jabber.org

    • Patch Available

    Description

      This configuration logs in, presence works, but message is not received by the participant.

      		from("timer://kickoff?period=10000&delay=1").
      		setBody(constant("xmpp message")).
      		to("xmpp://xxxxxxxx@gmail.com/?resource=camel-user&password=xxxxxx&participant=xxxxxxxx@jabber.org");
      

      It is cause by the code

      message.setFrom(endpoint.getUser());

      1. There is no need to set "from" field: smack will fetch this info from the connection info and will set it up properly.

      2. I can't find the link, but according to common sence and examples in Instant Messaging and Presence "from" should be JID (Jabber ID) and not just user name!

      <message
      to='romeo@example.net'
      from='juliet@example.com/balcony'
      type='chat'
      xml:lang='en'>
      <body>Wherefore art thou, Romeo?</body>
      </message>

      3. "Normal" message is just a hint to UI that the message is not part of conversation but a standalone message. It does not matter practically but ideologically xmpp component will send messages as they flow and I'd say it is a conversation (or monologue to be precise). So no need to set "Normal" flag either. Smack will set it to the default "chat" type.

      Attachments

        1. patch.txt
          0.8 kB
          Vadim Chekan

        Activity

          People

            Unassigned Unassigned
            vchekan Vadim Chekan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: