Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
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.