|
|
|
@ -209,7 +209,7 @@
@@ -209,7 +209,7 @@
|
|
|
|
|
presenter = [[ChatPresenter alloc] initWithViewController:self]; |
|
|
|
|
|
|
|
|
|
self.infoUser = cUser; |
|
|
|
|
self.infoUser.cDevice.imei = self.imei; |
|
|
|
|
//self.infoUser.cDevice.imei = self.imei; |
|
|
|
|
// self.infoCircle = [cUser getCircleWithImei:cUser.cDevice.imei]; |
|
|
|
|
NSLog(@"%@",self.infoCircle); |
|
|
|
|
if (!self.chatType && self.infoCircle) |
|
|
|
@ -632,7 +632,7 @@
@@ -632,7 +632,7 @@
|
|
|
|
|
[self.infoCircle sendCircleMessageWithParameters:parameters |
|
|
|
|
success:^(id responseObject) { |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
} failure:^{ |
|
|
|
@ -648,7 +648,7 @@
@@ -648,7 +648,7 @@
|
|
|
|
|
[parameters setValue:cUser.accesstoken forKey:@"token"]; |
|
|
|
|
[self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
} failure:^{ |
|
|
|
@ -683,7 +683,7 @@
@@ -683,7 +683,7 @@
|
|
|
|
|
@"content":UIImageJPEGRepresentation(photo, 0.1)}]; |
|
|
|
|
[self.infoCircle sendCircleMessageWithParameters:parameters |
|
|
|
|
success:^(id responseObject) { |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypePhoto]; |
|
|
|
@ -697,7 +697,7 @@
@@ -697,7 +697,7 @@
|
|
|
|
|
[parameters setValue:cUser.openid forKey:@"openid"]; |
|
|
|
|
[parameters setValue:cUser.accesstoken forKey:@"token"]; |
|
|
|
|
[self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypePhoto]; |
|
|
|
@ -764,7 +764,7 @@
@@ -764,7 +764,7 @@
|
|
|
|
|
NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithDictionary:@{@"type":@(3), @"content":data,@"duration":voiceDuration}]; |
|
|
|
|
[self.infoCircle sendCircleMessageWithParameters:parameters |
|
|
|
|
success:^(id responseObject) { |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
NSString *fileName = [NSString stringWithFormat:@"%@.wav",responseObject[@"id"]]; |
|
|
|
|
NSString *wavPath = [CJFileUtility documentsPathSubDir:@"msg_audio" andFile:fileName]; |
|
|
|
@ -772,7 +772,7 @@
@@ -772,7 +772,7 @@
|
|
|
|
|
message.voicePath = wavPath; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeVoice]; |
|
|
|
|
presenter.isSended = YES; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
} failure:^{ |
|
|
|
|
|
|
|
|
|
}]; |
|
|
|
@ -787,7 +787,7 @@
@@ -787,7 +787,7 @@
|
|
|
|
|
[parameters setValue:cUser.accesstoken forKey:@"token"]; |
|
|
|
|
|
|
|
|
|
[self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { |
|
|
|
|
message.Id = responseObject[@"id"]; |
|
|
|
|
message.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:message]; |
|
|
|
|
NSString *fileName = [NSString stringWithFormat:@"%@.wav",responseObject[@"id"]]; |
|
|
|
|
NSString *wavPath = [CJFileUtility documentsPathSubDir:@"msg_audio" andFile:fileName]; |
|
|
|
@ -795,7 +795,7 @@
@@ -795,7 +795,7 @@
|
|
|
|
|
message.voicePath = wavPath; |
|
|
|
|
[weakSelf addMessage:message]; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeVoice]; |
|
|
|
|
presenter.isSended = YES; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
} failure:^{ |
|
|
|
|
|
|
|
|
|
}]; |
|
|
|
@ -826,7 +826,7 @@
@@ -826,7 +826,7 @@
|
|
|
|
|
[self.infoCircle sendCircleMessageWithParameters:parameters |
|
|
|
|
success:^(id responseObject) { |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:emotionMessage]; |
|
|
|
|
emotionMessage.Id = responseObject[@"id"]; |
|
|
|
|
emotionMessage.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf addMessage:emotionMessage]; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeEmotion]; |
|
|
|
@ -843,7 +843,7 @@
@@ -843,7 +843,7 @@
|
|
|
|
|
[parameters setValue:cUser.accesstoken forKey:@"token"]; |
|
|
|
|
[self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { |
|
|
|
|
[weakSelf setLastShowTimetampWithMessage:emotionMessage]; |
|
|
|
|
emotionMessage.Id = responseObject[@"id"]; |
|
|
|
|
emotionMessage.id = responseObject[@"id"]; |
|
|
|
|
[weakSelf addMessage:emotionMessage]; |
|
|
|
|
self->presenter.isSended = YES; |
|
|
|
|
[weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeEmotion]; |
|
|
|
|