本文介绍了XEP - 0055与iOS和ejabberd?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施XEP-0055,ejabbed支持如

I am trying to implement XEP-0055 which is supported by ejabbed as shown here in supported xeps

这是我的要求:

XMPPIQ *iq = [[XMPPIQ alloc] init];
[iq addAttributeWithName:@"type" stringValue:@"get"];
[iq addAttributeWithName:@"from" stringValue:@"[email protected]"];
[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="[email protected]/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

Why am I receiving feature-not-implemented? Link to official XEP description.

推荐答案

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

In ejabberd, the search functionality is delegated to a subdomain, by default using the vjud prefix. Try sending the search request to vjud.company.com instead.

这篇关于XEP - 0055与iOS和ejabberd?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 12:48