审核小版本
This commit is contained in:
@@ -90,7 +90,6 @@
|
||||
}
|
||||
#pragma mark- UIPickerViewDelegate,UIPickerViewDataSource
|
||||
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
@@ -1915,7 +1915,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}
|
||||
//发送消息成功回调
|
||||
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {
|
||||
// 非本房间不处理
|
||||
if (![message.session.sessionId isEqualToString:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[self.userInfo.partitionId]];
|
||||
if([message.session.sessionId isEqualToString:publicChatRoomId]){
|
||||
// 非本房间不处理
|
||||
@@ -1924,22 +1927,34 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}else if(message.messageType == NIMMessageTypeImage){
|
||||
[self.messageContainerView handleNIMImageMessage:message];
|
||||
}
|
||||
return;;
|
||||
}
|
||||
|
||||
if (![message.session.sessionId isEqualToString:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 非本房间不处理
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
return;
|
||||
id spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
NSDictionary *antispamDic = nil;
|
||||
if ([spamResExt isKindOfClass:[NSArray class]]) {
|
||||
antispamDic = [spamResExt xpSafeObjectAtIndex:0];
|
||||
} else if ([spamResExt isKindOfClass:[NSDictionary class]]) {
|
||||
antispamDic = spamResExt[@"antispam"];
|
||||
}
|
||||
NSDictionary *realAntiDic = nil;
|
||||
if ([[antispamDic allKeys] containsObject:@"antispam"]) {
|
||||
realAntiDic = antispamDic[@"antispam"];;
|
||||
} else {
|
||||
realAntiDic = antispamDic;
|
||||
}
|
||||
if (realAntiDic) {
|
||||
NSInteger suggestion = [realAntiDic[@"suggestion"] integerValue];
|
||||
if (suggestion == 2) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (error) return;
|
||||
if (message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
|
Reference in New Issue
Block a user