审核小版本

This commit is contained in:
eggmanQQQ
2024-07-06 16:36:47 +08:00
parent f10b286101
commit af707b8bfd
2 changed files with 26 additions and 12 deletions

View File

@@ -90,7 +90,6 @@
}
#pragma mark- UIPickerViewDelegate,UIPickerViewDataSource
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
return 3;
}

View File

@@ -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;