1.0.19 feat:移除 API:privateChat/check
This commit is contained in:
@@ -138,7 +138,6 @@
|
||||
self.configInfo.appUiSetting.navbar = @"https://wx2.moyu.im/mw600/008ElFOcly1hvbe8wq5tkj318g0totuv.jpg";
|
||||
|
||||
self.configInfo.appUiSetting.settingStatus = arc4random()%2;
|
||||
|
||||
#endif
|
||||
|
||||
if (self.configInfo && self.configInfo.appUiSetting && self.configInfo.appUiSetting.settingStatus == 1) {
|
||||
|
@@ -11,9 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (Message)
|
||||
|
||||
+ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid ;
|
||||
///获取私聊限制接口
|
||||
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid;
|
||||
+ (void)getChatLimit:(HttpRequestHelperCompletion)completion receiverUid:(NSString *)receiverUid;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -13,9 +13,6 @@
|
||||
NSString * fang = [NSString stringFromBase64String:@"cHJpdmF0ZUNoYXQvbGltaXQ="];///privateChat/limit
|
||||
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil];
|
||||
}
|
||||
///获取私聊限制接口
|
||||
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid{
|
||||
[self makeRequest:@"privateChat/check" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, content,toUid,nil];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -770,66 +770,35 @@
|
||||
}
|
||||
|
||||
- (void)didFailRetry:(NIMMessage *)message {
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
if (message.isReceivedMsg) {
|
||||
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
|
||||
} else {
|
||||
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil];
|
||||
}
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
if (message.isReceivedMsg) {
|
||||
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
|
||||
} else {
|
||||
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendTextMessage:(NSString *)text {
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
NIMMessage *message = [NIMMessageMaker msgWithText:text];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
};
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:text toUid:self.session.sessionId];
|
||||
|
||||
|
||||
NIMMessage *message = [NIMMessageMaker msgWithText:text];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid}; //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
}
|
||||
|
||||
- (void)audioRecordCompletion:(NSString *)recordPath {
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
};
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid}; //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
}
|
||||
|
||||
#pragma mark - TZImagePickerControllerDelegate
|
||||
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
|
||||
[photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj) {
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
};
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid}; //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -1095,16 +1064,9 @@
|
||||
}
|
||||
// 发送消息
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:image];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
};
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[view resetChoosePhotos];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid}; //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[view resetChoosePhotos];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1127,19 +1089,11 @@
|
||||
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
|
||||
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
|
||||
}
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
};
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
|
||||
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid}; //表明该条消息的发送者的账号或者消息所属的群组 ID
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
}
|
||||
[picker dismissViewControllerAnimated:YES completion:^{}];
|
||||
}
|
||||
|
@@ -257,11 +257,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
[self.presenter checkInviteUserInfo:self.inviteCode];
|
||||
}
|
||||
[self requestGiftList];
|
||||
///主要功能:给主播分流
|
||||
// [self clientStartApp];
|
||||
|
||||
// ///开启心跳 记录用户登录状态
|
||||
// [[ClientConfig shareConfig] addHeartBratTimer];
|
||||
|
||||
XPAdImageTool.shareImageTool.isImLogin = YES;
|
||||
|
||||
@@ -814,13 +809,15 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
image:(NSString *)imageURL
|
||||
selectedImage:(NSString *)selectedImageURL
|
||||
index:(NSInteger)index {
|
||||
|
||||
itemVc.title = @"";
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)}
|
||||
forState:UIControlStateSelected];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xB8B7C7)}
|
||||
forState:UIControlStateNormal];
|
||||
|
||||
if ([itemVc isKindOfClass:[XPBlankViewController class]]) {
|
||||
itemVc.tabBarItem.image = [[UIImage imageNamed:imageURL] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImageURL] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
}
|
||||
BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:itemVc];
|
||||
return nav;
|
||||
}
|
||||
|
Reference in New Issue
Block a user