XEP - 0055与iOS和ejabberd?

时间:2014-11-07 11:48:42

标签: ios objective-c xmpp ejabberd

我正在尝试实施eababbed支持的XEP-0055,如supported xeps

中所示

这是我的要求:

XMPPIQ *iq = [[XMPPIQ alloc] init];
[iq addAttributeWithName:@"type" stringValue:@"get"];
[iq addAttributeWithName:@"from" stringValue:@"testuser1@company.com"];
[iq addAttributeWithName:@"to" stringValue:@"company.com"];
[iq addAttributeWithName:@"id" stringValue:@"search1"];
XMPPElement *query = [XMPPElement elementWithName:@"query"];
[query setXmlns:@"jabber:iq:search"];
[iq addChild:query];
[self.xmppStream sendElement:iq];

我收到了这个回复:

<iq xmlns="jabber:client" from="company.com" to="testuser1@company.com/2834146151141475281662718" type="error" id="search1">
<query xmlns="jabber:iq:search"/>
<error code="501" type="cancel">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

为什么我收到功能未实现?链接到官方XEP description.

1 个答案:

答案 0 :(得分:2)

在ejabberd中,搜索功能被委派给子域,默认情况下使用vjud前缀。请尝试将搜索请求发送至vjud.company.com