【发布时间】:2014-11-07 11:48:41
【问题描述】:
我正在尝试实现由 ejabbed 支持的 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.
【问题讨论】:
标签: ios objective-c xmpp ejabberd