有时添加名册时,ejabberd无法设置昵称 [英] ejabberd can not set nickname when add roster sometimes

查看:91
本文介绍了有时添加名册时,ejabberd无法设置昵称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将iOS xmppframework和ejabberd用作xmpp服务器。添加带有昵称的花名册时,有时可以设置昵称,有时不能设置昵称。我发送到服务器的数据包是:

I am using iOS xmppframework and ejabberd as the xmpp server.When I add rosters with nickname, sometimes I can set the nick, sometimes I can not set nick. The packets I sent to the server are:

2015-07-03 10:19:24:144 pigai[36644:3a0b] The nick is songxiao
2015-07-03 10:19:24:144 pigai[36644:3a0b] SEND: <iq type="set" xmlns="jabber:client" id="roster-remotely-managed"><query xmlns="jabber:iq:roster"><item jid="xh1@192.168.1.67" name="songxiao"/></query></iq>
2015-07-03 10:19:24:144 pigai[36644:800b] SEND: <presence type="subscribe" to="xh1@192.168.1.67"><x xmlns="vcard-temp:x:update"><photo>c769b958f910fb6bfde4e8131385cc5ad2d95e0b</photo></x></presence>
2015-07-03 10:19:24:576 pigai[36644:3a0b] RECV: <iq xmlns="jabber:client" from="test3@192.168.1.67" to="test3@192.168.1.67/iPhone" id="push2270407375" type="set"><query xmlns="jabber:iq:roster" ver="6e3b72a923e4574fac87e8e89f08eee251cf73c8"><item subscription="none" name="songxiao" jid="xh1@192.168.1.67"/></query></iq>
2015-07-03 10:19:24:576 pigai[36644:3a0b] RECV: <r xmlns="urn:xmpp:sm:3"/>
2015-07-03 10:19:24:576 pigai[36644:3a0b] RECV: <iq xmlns="jabber:client" from="test3@192.168.1.67" to="test3@192.168.1.67/iPhone" id="roster-remotely-managed" type="result"/>
2015-07-03 10:19:24:577 pigai[36644:3a0b] RECV: <r xmlns="urn:xmpp:sm:3"/>
2015-07-03 10:19:24:577 pigai[36644:3a0b] RECV: <iq xmlns="jabber:client" from="test3@192.168.1.67" to="test3@192.168.1.67/iPhone" id="push2639732641" type="set"><query xmlns="jabber:iq:roster" ver="b16ad5f42baf7c0fe11925ed879ac7ecb0bcfb85"><item ask="subscribe" subscription="none" jid="xh1@192.168.1.67"/></query></iq>
2015-07-03 10:19:26:602 pigai[36644:433] RECV: <r xmlns="urn:xmpp:sm:3"/>
2015-07-03 10:19:26:602 pigai[36644:433] SEND: <a xmlns="urn:xmpp:sm:3" h="15"/>
2015-07-03 10:19:26:808 pigai[36644:4b17] SEND: <a xmlns="urn:xmpp:sm:3" h="15"/>

未设置昵称。从客户端来看,昵称为null。从服务器端来看,该缺口未存储在数据库中。

The nick was not set. From the client side, the nick is null. From the server side, the nick is not stored in the database.

推荐答案

以下是应该可以正常工作的序列:

Here is a sequence that should work fine:


  1. 发送状态订阅。

  2. 等待回复。

  3. 在花名册项目上设置名称。

我们将看看是否可以改进以更好地处理这种情况。

We will have a look to see if we can improve to handle this case better as well.

这篇关于有时添加名册时,ejabberd无法设置昵称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆