Sync Sent / Received XMPP Chat Messages

The script . I am trying to create a website with chat widgets. I am using ASP.NET, C #, the agsXMPP library as my tools to achieve this. I am using an Openfire jabber server for an XMPP server.

Problem . When I access a widget on a website and start a conversation, I send a message with the type of message "chat" and a set of threads. I get this message on the client in this case Spark. When I reply to this message, I see that the stream value does not match the one I sent? According to RFC 3921 section 2.1.2.3 , the value of an element is generated by the sender and SHOULD be copied back in any responses. However, I do not see this. This means that I cannot associate the response with the message I sent.

Can someone help me with what I am missing? Below is the message sent and received.

Sent message :<message type="chat" to="saurabh@127.0.0.1/spark" id="agsXMPP_6" from="gantir@127.0.0.1/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: xxx@example.com Issue: Sample Test</body></message>

Received message :<message id="BTqN4-34" to="gantir@127.0.0.1/CPWebchat" from="saurabh@127.0.0.1/spark" type="chat"><body>Hello</body> <thread>42MtKq</thread><x xmlns="jabber:x:event"><offline/> <composing/></x></message>

0
1
+1

Source: https://habr.com/ru/post/1722587/


All Articles