Scenario: I am trying to develop a web site which features a chat widget. I am using ASP.NET, C#, agsXMPP library as my tools in achieving this purpose. I use Openfire jabber server for XMPP server.
Problem: When I access the widget on the website and start chatting, I send a message with message type “chat” and thread set. I receive this message on the client in this case Spark. When I reply to this message, I see that the thread value is not the same as the one I sent? According toRFC 3921 section 188.8.131.52, The value of the element is generated by the sender and SHOULD be copied back in any replies. However, I don’t see this happening.This means, I cannot link the response with the message I sent.
The question is very similar to the one posted long back on the forums here. I cannot employ that solution here as, only one user account is used to impersonate chat conversations from multiple clients (web instances) and all of them will be chatting with the same user (jid).
Re: How do I synchronize sent/received Chat messages?Can anyone help me with what I am missing? The following is the message sent and received.
<message type="chat" to="email@example.com/spark" id="agsXMPP_6" from="firstname.lastname@example.org/CPWebchat"><thread>d6ddeebe-f23f-4854-a315-2a9de32906b8</thread><subject>Ramjee Ganti</subject><body>An Anonymous user via the web is attempting to contact you. Name: Ramjee Ganti Email: email@example.com Issue: Sample Test</body></message>
<message id="BTqN4-34" to="firstname.lastname@example.org/CPWebchat" from="email@example.com/spark" type="chat"><body>Hello</body> <thread>42MtKq</thread><x xmlns="jabber:x:event"><offline/> <composing/></x></message>