我正在尝试实现XEP-0055,受ejabbed支持,如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 description.

最佳答案

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

关于ios - XEP-0055使用iOS和ejabberd吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26800596/

10-11 19:34