@@ -447,7 +447,7 @@ - (void)messagesDidReceive:(NSArray *)aMessages
447447{
448448 __weak typeof (self) weakself = self;
449449 dispatch_async (weakself.workQueue , ^{
450- for (EMMessage *msg in aMessages) {
450+ for (EMChatMessage *msg in aMessages) {
451451 [weakself _parseMsg: msg];
452452 }
453453 });
@@ -457,7 +457,7 @@ - (void)cmdMessagesDidReceive:(NSArray *)aCmdMessages
457457{
458458 __weak typeof (self) weakself = self;
459459 dispatch_async (weakself.workQueue , ^{
460- for (EMMessage *msg in aCmdMessages) {
460+ for (EMChatMessage *msg in aCmdMessages) {
461461 [weakself _parseMsg: msg];
462462 }
463463 });
@@ -486,9 +486,9 @@ - (void)sendInviteMsgToCallee:(NSString*)aUid type:(EaseCallType)aType callId:(N
486486// if(aType == EaseCallType1v1Video) {
487487// [ext setObject:EMCOMMUNICATE_TYPE_VIDEO forKey:EMCOMMUNICATE_TYPE];
488488// }
489- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
489+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
490490 __weak typeof (self) weakself = self;
491- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
491+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
492492 if (aCompletionBlock)
493493 aCompletionBlock (weakself.modal .currentCall .callId ,nil );
494494 if (error) {
@@ -505,9 +505,9 @@ - (void)sendAlertMsgToCaller:(NSString*)aCallerUid callId:(NSString*)aCallId dev
505505 EMCmdMessageBody* msgBody = [[EMCmdMessageBody alloc ] initWithAction: @" rtcCall" ];
506506 msgBody.isDeliverOnlineOnly = YES ;
507507 NSDictionary * ext = @{kMsgType :kMsgTypeValue ,kAction :kAlertAction ,kCallId :aCallId,kCalleeDevId :self.modal .curDevId ,kCallerDevId :aDevId,kTs :[self getTs ]};
508- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aCallerUid from: self .modal.curUserAccount to: aCallerUid body: msgBody ext: ext];
508+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aCallerUid from: self .modal.curUserAccount to: aCallerUid body: msgBody ext: ext];
509509 __weak typeof (self) weakself = self;
510- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
510+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
511511 if (error) {
512512 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
513513 }
@@ -522,9 +522,9 @@ - (void)sendComfirmRingMsgToCallee:(NSString*)aUid callId:(NSString*)aCallId isV
522522 EMCmdMessageBody* msgBody = [[EMCmdMessageBody alloc ] initWithAction: @" rtcCall" ];
523523 msgBody.isDeliverOnlineOnly = YES ;
524524 NSDictionary * ext = @{kMsgType :kMsgTypeValue ,kAction :kConfirmRingAction ,kCallId :aCallId,kCallerDevId :self.modal .curDevId ,kCallStatus :[NSNumber numberWithBool: aIsCallValid],kTs :[self getTs ],kCalleeDevId :aCalleeDevId};
525- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
525+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
526526 __weak typeof (self) weakself = self;
527- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
527+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
528528 if (error) {
529529 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
530530 }
@@ -538,9 +538,9 @@ - (void)sendCancelCallMsgToCallee:(NSString*)aUid callId:(NSString*)aCallId
538538 return ;
539539 EMCmdMessageBody* msgBody = [[EMCmdMessageBody alloc ] initWithAction: @" rtcCall" ];
540540 NSDictionary * ext = @{kMsgType :kMsgTypeValue ,kAction :kCancelCallAction ,kCallId :aCallId,kCallerDevId :self.modal .curDevId ,kTs :[self getTs ]};
541- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
541+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
542542 __weak typeof (self) weakself = self;
543- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
543+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
544544 if (error) {
545545 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
546546 }
@@ -557,9 +557,9 @@ - (void)sendAnswerMsg:(NSString*)aCallerUid callId:(NSString*)aCallId result:(NS
557557 NSMutableDictionary * ext = [@{kMsgType :kMsgTypeValue ,kAction :kAnswerCallAction ,kCallId :aCallId,kCalleeDevId :self.modal .curDevId ,kCallerDevId :aDevId,kCallResult :aResult,kTs :[self getTs ]} mutableCopy];
558558 if (self.modal .currentCall .callType == EaseCallType1v1Audio && self.bNeedSwitchToVoice )
559559 [ext setObject: [NSNumber numberWithBool: YES ] forKey: kVideoToVoice ];
560- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aCallerUid from: self .modal.curUserAccount to: aCallerUid body: msgBody ext: ext];
560+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aCallerUid from: self .modal.curUserAccount to: aCallerUid body: msgBody ext: ext];
561561 __weak typeof (self) weakself = self;
562- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
562+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
563563 if (error) {
564564 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
565565 }
@@ -575,9 +575,9 @@ - (void)sendConfirmAnswerMsgToCallee:(NSString*)aUid callId:(NSString*)aCallId r
575575 EMCmdMessageBody* msgBody = [[EMCmdMessageBody alloc ] initWithAction: @" rtcCall" ];
576576 msgBody.isDeliverOnlineOnly = YES ;
577577 NSMutableDictionary * ext = [@{kMsgType :kMsgTypeValue ,kAction :kConfirmCalleeAction ,kCallId :aCallId,kCallerDevId :self.modal .curDevId ,kCalleeDevId :aDevId,kCallResult :aResult,kTs :[self getTs ]} mutableCopy];
578- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
578+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
579579 __weak typeof (self) weakself = self;
580- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
580+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
581581 if (error) {
582582 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
583583 }
@@ -594,9 +594,9 @@ - (void)sendVideoToVoiceMsg:(NSString*)aUid callId:(NSString*)aCallId
594594 return ;
595595 EMCmdMessageBody* msgBody = [[EMCmdMessageBody alloc ] initWithAction: @" rtcCall" ];
596596 NSDictionary * ext = @{kMsgType :kMsgTypeValue ,kAction :kVideoToVoice ,kCallId :aCallId,kTs :[self getTs ]};
597- EMMessage * msg = [[EMMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
597+ EMChatMessage * msg = [[EMChatMessage alloc ] initWithConversationID: aUid from: self .modal.curUserAccount to: aUid body: msgBody ext: ext];
598598 __weak typeof (self) weakself = self;
599- [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMMessage *message, EMError *error) {
599+ [[[EMClient sharedClient ] chatManager ] sendMessage: msg progress: nil completion: ^(EMChatMessage *message, EMError *error) {
600600 if (error) {
601601 [weakself callBackError: EaseCallErrorTypeIM code: error.code description: error.errorDescription];
602602 }
@@ -610,7 +610,7 @@ - (NSNumber*)getTs
610610
611611#pragma mark - 解析消息信令
612612
613- - (void )_parseMsg : (EMMessage *)aMsg
613+ - (void )_parseMsg : (EMChatMessage *)aMsg
614614{
615615 if (![aMsg.to isEqualToString: [EMClient sharedClient ].currentUsername])
616616 return ;
0 commit comments