XMPPFramework“键入".消息状态 [英] XMPPFramework "typing.." status for message
问题描述
我正在为当前项目使用robbiehanson/XMPPFramework.如何使用XMPPFramework获取消息键入状态?有XEP-184协议,但现在不推荐使用.在这里需要帮助以获取iOS中的撰写状态.问候,巴特
I am using robbiehanson/XMPPFramework for my current project. How to get the message typing status using XMPPFramework? There XEP- 184 protocol but those are deprecated right now . Need assistance here for getting composing status in iOS . Regards, Bhat
推荐答案
联系人正在键入"通知的最常用协议是< body/> 元素旁边):
The most commonly used protocol for "contact is typing" notifications is XEP-0085: Chat State Notifications. As described in more detail there, the first message to a contact should contain an "active" state element (next to the <body/>
element):
<active xmlns='http://jabber.org/protocol/chatstates'/>
如果联系人以聊天状态做出响应,则客户端可以继续使用其他状态,例如正在撰写":
If the contact responds with a chat state, the client can go ahead and use other states, such as "composing":
<composing xmlns='http://jabber.org/protocol/chatstates'/>
或已暂停"(用户已输入文字,但未积极输入文字):
or "paused" (the user has entered text, but isn't actively typing):
<paused xmlns='http://jabber.org/protocol/chatstates'/>
或不活动",最后当用户通过关闭聊天窗口或类似内容结束对话时消失".
or "inactive", and finally "gone" when the user ends the conversation by closing the chat window or similar.
这篇关于XMPPFramework“键入".消息状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!