我正在使用以下code
來阻止組用戶,但它給我error
。如何使用QuickBlox Ios框架阻止組中的用戶2.2
以下是我的邏輯維護QBPrivacyList
來阻止它,但我沒有得到它的成功。
-(void)ViewDidLoad{
[[QBChat instance] addDelegate:self];
[[QBChat instance] retrievePrivacyListWithName:@"group_public"];
}
- (void)chatDidReceivePrivacyList:(QBPrivacyList *)privacyList{
[SVProgressHUD dismiss];
blockPrivacyList = privacyList;
[[QBChat instance] setActivePrivacyListWithName:blockPrivacyList.name];
}
-(IBAction)blockGroupUser{
QBPrivacyItem *item = [[QBPrivacyItem alloc] initWithType:GROUP valueForType:user.ID action:DENY];
if (blockPrivacyList) {
[blockPrivacyList addObject:item]; // add new user if already privacy list is there
}else
blockPrivacyList= [[QBPrivacyList alloc] initWithName:@"group_public" items:@[item]];
}
[[QBChat instance] setPrivacyList:blockPrivacyList];
}
了以下錯誤:
<iq xmlns="jabber:client" id="9C79DCE1-AC59-4C9D-8AB2-BE2387B1EED4" to="[email protected]/D060E713-F1DC-46D7-A2BF-8DA7BDB22CBA" type="error"><query xmlns="jabber:iq:privacy"><list name="group_public"><item action="deny" order="5291124" value="[email protected]" type="group"><iq/><message/><presence-in/><presence-out/></item></list></query><error type="cancel" code="404"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>