问题描述
场景:我正在尝试开发一个带有聊天小部件的网站.我正在使用ASP.NET,C#,agsXMPP库作为实现此目的的工具.我将Openfire jabber服务器用于XMPP服务器.
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.
问题:当我访问网站上的小部件并开始聊天时,我发送的消息类型为聊天"和线程的消息放.在这种情况下,我会在客户端上收到此消息.当我回复此消息时,我看到 thread 值与我发送的值不同吗?根据 RFC 3921第2.1.2.3节,元素的值由发送者生成,并应在任何回复中复制回去.但是,我看不到这种情况.这意味着,我无法将响应与我发送的消息链接起来.
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 to RFC 3921 section 2.1.2.3, 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.
有人可以帮我解决我所缺少的吗?以下是发送和接收的消息.
Can anyone help me with what I am missing? The following is the message sent and received.
收到的消息:<message id="BTqN4-34" to="[email protected]/CPWebchat" from="[email protected]/spark" type="chat"><body>Hello</body> <thread>42MtKq</thread><x xmlns="jabber:x:event"><offline/> <composing/></x></message>
推荐答案
RFC应该说"thread"元素(请参见 http://tools.ietf.org/html/rfc2119 )将以回复的形式返回.可能是该客户端没有实现它.
The RFC says the "thread" element SHOULD (see http://tools.ietf.org/html/rfc2119) be returned in replies. It may be that this client just didn't implement it.
这篇关于XMPP聊天发送/接收的消息同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!