|
@@ -3466,10 +3466,12 @@ _strURLGoback=@"";
|
|
|
// NSString *userName = self.userNames[self.groupMessagesIndex];
|
|
|
|
|
|
if (self.isCYMSGgroupANDFriendy) {
|
|
|
- JXMessageObject *msg=[[JXMessageObject alloc]init];
|
|
|
+
|
|
|
+ NSMutableArray *tempMsg=[NSMutableArray array];
|
|
|
+ JXMessageObject *msg=nil;
|
|
|
|
|
|
for (NSString *userId in _userIds) {
|
|
|
-
|
|
|
+ msg=[[JXMessageObject alloc]init];
|
|
|
if ([file length]>0) {
|
|
|
msg.timeSend = [NSDate date];
|
|
|
msg.fromUserId = MY_USER_ID;
|
|
@@ -3499,17 +3501,28 @@ _strURLGoback=@"";
|
|
|
[msg insert:userId];
|
|
|
|
|
|
[self showOneMsg:msg];
|
|
|
+
|
|
|
+ [tempMsg addObject:msg];
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ NSLog(@"userIdxxxx %@",msg.messageId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
- [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:msg.messageId toView:self];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [tempMsg enumerateObjectsUsingBlock:^(JXMessageObject *msgX, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
+
|
|
|
+ [g_server uploadFile:file validTime:chatPerson.chatRecordTimeOut messageId:msgX.messageId toView:self];
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
|
|
|
|
|
|
// 写入数据库
|
|
|
- NSArray *array = self.userIds;
|
|
|
+ NSArray *array = _userIds;
|
|
|
NSString *userIdsString = [array componentsJoinedByString:@","];
|
|
|
array = self.userNames;
|
|
|
NSString *userNamesString = [array componentsJoinedByString:@","];
|
|
@@ -4594,17 +4607,16 @@ _strURLGoback=@"";
|
|
|
if (_useInfoTempChat==11) {
|
|
|
|
|
|
p.tempChat = 11;
|
|
|
- }else
|
|
|
- {
|
|
|
-
|
|
|
- p.tempChat = 1;
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// [g_xmpp sendMessage:p roomName:self.roomJid];//发送消息
|
|
|
if (self.isCYMSGgroupANDFriendy) {
|
|
|
for (NSString *userId in self.userIds) {
|
|
|
if (userId.length>10) {
|
|
|
- [g_xmpp sendMessage:p roomName:userId];
|
|
|
+ if ([p.toUserId isEqualToString:userId]) {
|
|
|
+ [g_xmpp sendMessage:p roomName:userId];
|
|
|
+ }
|
|
|
}else {
|
|
|
[g_xmpp sendMessage:p roomName:userId];
|
|
|
}
|
|
@@ -4913,7 +4925,14 @@ _strURLGoback=@"";
|
|
|
return;
|
|
|
}
|
|
|
RITLPhotosViewController *photoController = RITLPhotosViewController.photosViewController;
|
|
|
- photoController.configuration.maxCount = 9;//最大的选择数目
|
|
|
+
|
|
|
+ if (_groundSendHelp==100) {
|
|
|
+
|
|
|
+ photoController.configuration.maxCount = 1;//最大的选择数目
|
|
|
+ }else{
|
|
|
+
|
|
|
+ photoController.configuration.maxCount = 9;//最大的选择数目
|
|
|
+ }
|
|
|
photoController.configuration.containVideo = YES;//选择类型,目前只选择图片不选择视频
|
|
|
|
|
|
photoController.photo_delegate = self;
|
|
@@ -5061,7 +5080,7 @@ _strURLGoback=@"";
|
|
|
if (_isGroupSendCancel) {
|
|
|
return;
|
|
|
}
|
|
|
- NSString *userId = self.userIds[self.groupMessagesIndex];
|
|
|
+ NSString *userId = _userIds[self.groupMessagesIndex];
|
|
|
NSArray *imageArr = [imageAndVideosDic objectForKey:@"images"];
|
|
|
NSArray *mediaArr = [imageAndVideosDic objectForKey:@"videos"];
|
|
|
if (imageArr.count > 0) {
|
|
@@ -5090,10 +5109,15 @@ _strURLGoback=@"";
|
|
|
}
|
|
|
self.groupMessagesIndex ++;
|
|
|
if (self.groupMessagesIndex < self.userIds.count) {
|
|
|
- if (_onceSendNum == 1 || self.groupMessagesIndex % _onceSendNum == 0) {
|
|
|
+ if (_onceSendNum == 1 || _groupMessagesIndex % _onceSendNum == 0) {
|
|
|
return;
|
|
|
}else{
|
|
|
- [self sendImagesAndVideos:imageAndVideosDic];
|
|
|
+
|
|
|
+ if (_groundSendHelp==100||_userIds.count>1) {
|
|
|
+ }else{
|
|
|
+
|
|
|
+ [self sendImagesAndVideos:imageAndVideosDic];
|
|
|
+ }
|
|
|
}
|
|
|
}else if (self.userIds){
|
|
|
self.groupMessagesIndex = 0;
|