Compare commits

...

2 Commits

Author SHA1 Message Date
eggmanQQQ
bae34f4061 审核小版本 2024-07-06 16:36:47 +08:00
eggmanQQQ
93b043c660 审核小版本 2024-07-05 17:15:16 +08:00
17 changed files with 212 additions and 158 deletions

View File

@@ -12856,7 +12856,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.26;
MARKETING_VERSION = 20.20.27;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -12898,7 +12898,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.26;
MARKETING_VERSION = 20.20.27;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -24,6 +24,7 @@ typedef NS_ENUM(NSUInteger, Pi_KeyType) {
KeyType_TRTC,///TRTC key
KeyType_NetEase,///云信的key
keyType_YiDunBussinessId,///易盾的id
keyType_YiDunPhotoBussinessId,///易盾图片的id
KeyType_FacePwdEncode, ///表情包解密key
KeyType_SudGameAppID,///小游戏APPID
KeyType_SudGameAppKey,///小游戏APPKey

View File

@@ -67,7 +67,8 @@ NSString * const KeyWithType(Pi_KeyType type) {
@(KeyType_Agora) : @"f8713b6ec98c4c01adaf34cb4fa091b1",
@(KeyType_TRTC) : @"1400741885",
@(KeyType_NetEase) : @"79bc37000f4018a2a24ea9dc6ca08d32",
@(keyType_YiDunBussinessId) : @"yinyouApnsDebug",
// @(keyType_YiDunBussinessId) : @"3611b99d0457202a7f69151288183236",
// @(keyType_YiDunPhotoBussinessId) : @"",
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
@(KeyType_SudGameAppID) : @"1578948593831571457",
@(KeyType_SudGameAppKey) : @"J9lHOXvFWkAZiTfl4SK7IGt0wDnW3fWd",
@@ -85,7 +86,8 @@ NSString * const KeyWithType(Pi_KeyType type) {
@(KeyType_Agora) : @"3da88e33bc4f45019cc867ec51d7b465",///
@(KeyType_SudGameAppID) : @"1578948593831571457",///
@(KeyType_SudGameAppKey) : @"J9lHOXvFWkAZiTfl4SK7IGt0wDnW3fWd",///
@(keyType_YiDunBussinessId) : @"f459972b432106844b89fd58c92b8061",
// @(keyType_YiDunBussinessId) : @"f459972b432106844b89fd58c92b8061",
// @(keyType_YiDunPhotoBussinessId) : @"",
@(KeyType_TRTC) : @"1400823228",///
@(KeyType_NetEase) : @"7371d729710cd6ce3a50163b956b5eb6",///
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",///

View File

@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
///内置版本号
#define PI_App_Version @"1.0.12"
#define PI_App_Version @"1.0.13"
///渠道
#define PI_App_Source @"appstore"
#define PI_Test_Flight @"TestFlight"

View File

@@ -48,6 +48,7 @@
NIMImageOption *option = [[NIMImageOption alloc] init];
option.compressQuality = 0.7;
imageObject.option = option;
return [NIMMessageMaker generateImageMessage:imageObject];
}
@@ -69,9 +70,16 @@
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
imageObject.displayName = [NSString stringWithFormat:@"%@%@",YMLocalizedString(@"NIMMessageMaker3"), dateString];
NIMMessage *message = [[NIMMessage alloc] init];
message.messageObject = imageObject;
message.apnsContent = YMLocalizedString(@"NIMMessageMaker4");
// NIMAntiSpamOption *spamOption = [[NIMAntiSpamOption alloc] init];
// spamOption.yidunEnabled = YES;
// spamOption.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = spamOption;
[self setupMessage:message];
return message;
}
@@ -87,10 +95,10 @@
setting.apnsEnabled = YES;
message.setting = setting;
NIMAntiSpamOption *option = [NIMAntiSpamOption new];
option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId);
message.antiSpamOption = option;
// NIMAntiSpamOption *option = [NIMAntiSpamOption new];
// option.yidunEnabled = YES;
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = option;
}

View File

@@ -27,15 +27,6 @@
}
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:text attributes:[self messageTextAttibutes]];
NSRange range = [text rangeOfString:YMLocalizedString(@"MessageRiskAlertModel0")];
if ((range.location + range.length) <= text.length) {
[attribute addAttribute:NSForegroundColorAttributeName value:[DJDKMIMOMColor appEmphasizeColor] range:range];
[attribute yy_setTextHighlightRange:range color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kNetworkRenovateURL);
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}];
}
self.isHiddenAvatar = YES;
self.attributedText = attribute;
CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2, MAXFLOAT);

View File

@@ -111,25 +111,17 @@
[self initHeaderAndFooterRrfresh];
[IQKeyboardManager sharedManager].enable = NO;
[IQKeyboardManager sharedManager].enableAutoToolbar = NO;
[[NIMSDK sharedSDK].chatManager addDelegate:self];
}
- (void)initHeaderAndFooterRrfresh {
[self initData];
}
#pragma mark -
- (void)loadAlbumPhotos {
[YYUtility checkAssetsLibrayAvailable:^{
} denied:^{
} restriction:^{
}];
[YYUtility checkAssetsLibrayAvailable:^{} denied:^{} restriction:^{}];
}
#pragma mark - cell
@@ -519,16 +511,16 @@
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.messages.count;
return self.messages.count;
}
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
MessageBaseModel * message = [self.messages xpSafeObjectAtIndex:indexPath.row];
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)message;
if(message.messageType == SessionMessageType_Text){
if(textModel.isSelf){
MSSessionPublicChatHalRightTextCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSSessionPublicChatHalRightTextCell class]) forIndexPath:indexPath];
[cell render:message];
@@ -550,18 +542,18 @@
return cell;
}
NSString * identifier = [message cellContent:message];
///cell
MessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (!cell) {
/// identifier
[tableView registerClass:[MessageCell class] forCellReuseIdentifier:identifier];
/// cell
cell = [tableView dequeueReusableCellWithIdentifier:identifier];
}
cell.delegate = self;
[cell renderWithMessage:[self.messages xpSafeObjectAtIndex:indexPath.row]];
return cell;
NSString * identifier = [message cellContent:message];
///cell
MessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (!cell) {
/// identifier
[tableView registerClass:[MessageCell class] forCellReuseIdentifier:identifier];
/// cell
cell = [tableView dequeueReusableCellWithIdentifier:identifier];
}
cell.delegate = self;
[cell renderWithMessage:[self.messages xpSafeObjectAtIndex:indexPath.row]];
return cell;
}
@@ -605,7 +597,7 @@
if(self.messages.count > 0){
NSIndexPath *ip = [NSIndexPath indexPathForRow:self.messages.count-1 inSection:0]; //
[self.sessionTableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:YES]; //
}
}
@@ -626,15 +618,34 @@
[self.messages addObject:model];
}
}
if (message.yidunAntiSpamRes) {
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
NSDictionary * dic = @{@"suggestion": @"2"};
message.localExt = dic;
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
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) {
NSDictionary * dic = @{@"suggestion": @"2"};
message.localExt = dic;
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
}
}
}
[self.sessionTableView reloadData];
if(self.messages.count > 0){
NSIndexPath *ip = [NSIndexPath indexPathForRow:self.messages.count-1 inSection:0]; //
@@ -642,19 +653,16 @@
}
}
- (void)sendTextMessage:(NSString *)text {
NIMMessage *message = [NIMMessageMaker msgWithText:text];
message.remoteExt = [self getRemoteExt];
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
NIMMessage *message = [NIMMessageMaker msgWithText:text];
message.remoteExt = [self getRemoteExt];
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
// option.yidunEnabled = YES;
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = option;
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
}
-(NSDictionary *)getRemoteExt{
UserInfoModel *userInfo = self.userInfo;
@@ -680,20 +688,20 @@
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];
return remoteExt;
}
#pragma mark - TZImagePickerControllerDelegate
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
@kWeakify(self);
[photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
@kStrongify(self);
if (obj) {
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
message.remoteExt = [self getRemoteExt];
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
message.remoteExt = [self getRemoteExt];
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
}
}];
}
@@ -793,7 +801,7 @@
@kStrongify(self);
[self showNotPhoto:YMLocalizedString(@"SessionViewController19") content:YMLocalizedString(@"SessionViewController12")];
}];
}
- (void)inputBarView:(QInputBarView *)inputBarView onPhototButtonClick:(UIButton *)emotionSwitchButton {
@@ -804,42 +812,42 @@
[TZImagePickerConfig sharedInstance].allowPickingImage = YES;
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[TZImageManager manager] getCameraRollAlbumWithFetchAssets:NO completion:^(TZAlbumModel *model) {
[[TZImageManager manager] getAssetsFromFetchResult:model.result completion:^(NSArray<TZAssetModel *> *models) {
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray * array = [NSMutableArray array];
if (models.count > 40) {
for (int i = 0; i < 40; i++) {
TZAssetModel * assets = [models objectAtIndex:i];
QPhotoImageModel * infor = [[QPhotoImageModel alloc] init];
infor.isOrigin = NO;
infor.assetInfo = assets;
[array addObject:infor];
}
} else {
for (int i = 0; i < models.count; i++) {
TZAssetModel * assets = [models objectAtIndex:i];
QPhotoImageModel * infor = [[QPhotoImageModel alloc] init];
infor.isOrigin = NO;
infor.assetInfo = assets;
[array addObject:infor];
}
[[TZImageManager manager] getAssetsFromFetchResult:model.result completion:^(NSArray<TZAssetModel *> *models) {
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray * array = [NSMutableArray array];
if (models.count > 40) {
for (int i = 0; i < 40; i++) {
TZAssetModel * assets = [models objectAtIndex:i];
QPhotoImageModel * infor = [[QPhotoImageModel alloc] init];
infor.isOrigin = NO;
infor.assetInfo = assets;
[array addObject:infor];
}
self.phototArray = array;
if (self.phototArray.count > 0) {
self.photoView.photoList = self.phototArray;
[self.keyboardManager switchToPhotoBoardKeyboard];
} else {
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
imagePickerVc.modalPresentationStyle = UIModalPresentationOverFullScreen;
imagePickerVc.allowPickingVideo = NO;
imagePickerVc.allowTakeVideo = NO;
imagePickerVc.naviBgColor = [DJDKMIMOMColor appCellBackgroundColor];
imagePickerVc.naviTitleColor = [DJDKMIMOMColor mainTextColor];
imagePickerVc.barItemTextColor = [DJDKMIMOMColor mainTextColor];
[self presentViewController:imagePickerVc animated:YES completion:nil];
} else {
for (int i = 0; i < models.count; i++) {
TZAssetModel * assets = [models objectAtIndex:i];
QPhotoImageModel * infor = [[QPhotoImageModel alloc] init];
infor.isOrigin = NO;
infor.assetInfo = assets;
[array addObject:infor];
}
});
}];
}
self.phototArray = array;
if (self.phototArray.count > 0) {
self.photoView.photoList = self.phototArray;
[self.keyboardManager switchToPhotoBoardKeyboard];
} else {
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
imagePickerVc.modalPresentationStyle = UIModalPresentationOverFullScreen;
imagePickerVc.allowPickingVideo = NO;
imagePickerVc.allowTakeVideo = NO;
imagePickerVc.naviBgColor = [DJDKMIMOMColor appCellBackgroundColor];
imagePickerVc.naviTitleColor = [DJDKMIMOMColor mainTextColor];
imagePickerVc.barItemTextColor = [DJDKMIMOMColor mainTextColor];
[self presentViewController:imagePickerVc animated:YES completion:nil];
}
});
}];
}];
});
} denied:^{
@@ -854,14 +862,14 @@
_inputBarView.inputTextView.text = @"";
[_inputBarView textViewResignFirstResponder];
}
}
- (void)showNotPhoto:(NSString *)title content:(NSString *)content {
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.title = title;
config.message = content;
[TTPopup alertWithConfig:config confirmHandler:^{
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
@@ -879,7 +887,7 @@
if(self.messages.count > 0){
NSIndexPath *ip = [NSIndexPath indexPathForRow:self.messages.count-1 inSection:0]; //
[self.sessionTableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:NO]; //
}
[self.sessionTableView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.mas_equalTo(self.view);
@@ -904,7 +912,7 @@
emotionAtt.image = iconImage;
emotionAtt.imageName = emotion.displayName;
NSAttributedString *emotionAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)emotionAtt];
[_inputBarView insertEmotionAttributedString:emotionAttribute];
}
@@ -921,7 +929,7 @@
[self sendTextMessage:[_inputBarView textViewInputNormalText]];
_inputBarView.inputTextView.text = @"";
[_keyboardManager hideAllBoardView];
}
/**
@@ -953,9 +961,6 @@
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
[view resetChoosePhotos];
}
}
@@ -979,12 +984,16 @@
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
}
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
message.remoteExt = [self getRemoteExt];
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
// option.yidunEnabled = YES;
// option.businessId = @"e9da8bd5c76da23d5e37f87e5ab1f5e9";
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
message.remoteExt = [self getRemoteExt];
// message.antiSpamOption = option;
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
}
[picker dismissViewControllerAnimated:YES completion:^{}];
}

View File

@@ -705,15 +705,43 @@
[self.messages addObject:model];
}
if (message.yidunAntiSpamRes) {
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
NSDictionary * dic = @{@"suggestion": @"2"};
message.localExt = dic;
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
}
}
// if (message.yidunAntiSpamRes) {
// NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
// NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
// if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
// NSDictionary * dic = @{@"suggestion": @"2"};
// message.localExt = dic;
// [[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
// }
// }
if (message.yidunAntiSpamRes) {
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
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) {
NSDictionary * dic = @{@"suggestion": @"2"};
message.localExt = dic;
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
}
}
}
[self.sessionTableView reloadData];
[self.sessionTableView nim_scrollToBottom:YES];
}

View File

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

View File

@@ -114,10 +114,10 @@
message.remoteExt = remoteExt;
///
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId);
message.antiSpamOption = option;
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
// option.yidunEnabled = YES;
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = option;
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[userInfo.partitionId]];
NSString * sessionId = [self.delegate getPublicScreenType] == 0 ? [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId]:publicChatRoomId;
//

View File

@@ -131,10 +131,10 @@
message.remoteExt = remoteExt;
///
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId);
message.antiSpamOption = option;
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
// option.yidunEnabled = YES;
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = option;
NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId];
//
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];

View File

@@ -73,17 +73,16 @@
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
NIMMessage * message = [[NIMMessage alloc] init];
message.text = self.inputMessage;
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];
message.remoteExt = remoteExt;
///
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId);
message.antiSpamOption = option;
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
// option.yidunEnabled = YES;
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
// message.antiSpamOption = option;
NSString * sessionId = self.roomId;
//
self.sendButton.enabled = NO;

View File

@@ -252,7 +252,6 @@
}
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
}
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
}
- (void)onRoomUpdate {
@@ -267,8 +266,6 @@
self.collectButton.hidden = NO;
// self.collectButton.selected = roomInfo.isRoomFans;
}
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
}
#pragma mark - Event Response
- (void)showSharePanel {

View File

@@ -1915,7 +1915,40 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
}
//
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {
//
if (message.yidunAntiSpamRes) {
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
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) {
// NSDictionary * dic = @{@"suggestion": @"2"};
// message.localExt = dic;
// [[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:message.session completion:nil];
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
return;
}
}
}
// 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,23 +1957,9 @@ 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;
}
}
if (error) return;
if (message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;

View File

@@ -175,10 +175,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showAnchorCardKey:) name:kTabShowAnchorCardKey object:nil];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(switchLanguage:) name:@"kSwitchLanguage" object:nil];
}
-(void)switchLanguage:(NSNotification *)not{
[self initTabs:YES];
self.selectedIndex = 4;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
@@ -186,7 +188,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
if ([XPRoomMiniManager shareManager].getRoomInfo == nil) {
[self.roomMineView hiddenRoomMiniView];
}
}
- (void)viewWillDisappear:(BOOL)animated {

View File

@@ -2332,7 +2332,7 @@ ineHeadView12" = "الحمل";
"XPRoomViewController7" = "انتهى وقت البث لصاحب الغرفة";
"XPRoomViewController8" = "تم طردك من البث المباشر";
"XPRoomViewController9" = "تم حظرك من قبل المشرف";
"XPRoomViewController10" = "قد تحتوي الرسالة على معلومات غير ملائمة، يرجى التوقف عن إرسال مثل هذه الرسائل!";
"XPRoomViewController10" = "قد تحتوي الرسالة على معلومات غير قانونية، يرجى التوقف عن إرسال معلومات مماثلة مثل ذلك!";
"XPRoomViewController11" = "سوف تخرج من الغرفة وتفقد مكانك في قائمة الانتظار، هل أنت متأكد من الخروج؟";
"XPRoomViewController12" = "سوف تخرج من الغرفة وتفقد مكانك في قائمة الانتظار، هل أنت متأكد من الخروج؟";
"XPRoomViewController13" = "لقد وصلت إلى الأعلى~ سوف يتم إعادتك تلقائيًا إلى الغرفة الحالية";

View File

@@ -2061,7 +2061,7 @@
"XPRoomViewController7" = "The host has gone offline";
"XPRoomViewController8" = "You have been kicked out of the live room by the administrator";
"XPRoomViewController9" = "You have been blacklisted by the administrator";
"XPRoomViewController10" = "The message may contain inappropriate content. Please refrain from sending such messages!";
"XPRoomViewController10" = "The message may contain illegal information, please stop sending similar information like that!";
"XPRoomViewController11" = "Exiting the room will also exit the current queue. You need to queue again when re-entering. Are you sure you want to exit the room?";
"XPRoomViewController12" = "Exiting the room will also exit the current queue. You need to queue again when re-entering. Are you sure you want to exit the room?";
"XPRoomViewController13" = "Reached the top~ Automatically return to the current room";