Commit 633033769e66e02451a06c2f5fadea4b04007229

Authored by daojian
1 parent 30498db1

0.1.2 版本添加转余额消息,和转余额过期消息通知

CNLiveNewIMAManagerKit.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveNewIMAManagerKit' 10 s.name = 'CNLiveNewIMAManagerKit'
11 - s.version = '0.1.1' 11 + s.version = '0.1.2'
12 s.summary = 'A short description of CNLiveNewIMAManagerKit.' 12 s.summary = 'A short description of CNLiveNewIMAManagerKit.'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveNewIMAManagerKit/Classes/Playform/IMAContactManager.m
@@ -244,9 +244,15 @@ @@ -244,9 +244,15 @@
244 - (BOOL)isMyFriend:(IMAUser *)user 244 - (BOOL)isMyFriend:(IMAUser *)user
245 { 245 {
246 // 检查通讯录中是否含有些人 246 // 检查通讯录中是否含有些人
247 - IMAUser *u = [self isContainUser:user];  
248 -  
249 - return u != nil; 247 + if ([user.userId isEqualToString:[IMAPlatform sharedInstance].host.userId]) {
  248 + return YES;
  249 + }
  250 + NSInteger index = [self.friendsList indexOfObject:user];
  251 + if (index >= 0 && index < self.friendsList.count)
  252 + {
  253 + return YES;
  254 + }
  255 + return NO;
250 } 256 }
251 - (void)addContactChangedObserver:(id)observer handler:(SEL)selector forEvent:(NSUInteger)eventID 257 - (void)addContactChangedObserver:(id)observer handler:(SEL)selector forEvent:(NSUInteger)eventID
252 { 258 {
CNLiveNewIMAManagerKit/Classes/TIMCategory/TIMElem+ShowAPIs.m
@@ -497,6 +497,10 @@ @@ -497,6 +497,10 @@
497 { 497 {
498 return [NSClassFromString(@"CNCardMessageTableViewCell") class]; 498 return [NSClassFromString(@"CNCardMessageTableViewCell") class];
499 } 499 }
  500 + else if (msg.type == EIMAMSG_TransferBalance)
  501 + {
  502 + return [NSClassFromString(@"CNTransferBalanceCell") class];
  503 + }
500 else if(msg.type == EIMAMSG_VoiceWords) 504 else if(msg.type == EIMAMSG_VoiceWords)
501 { 505 {
502 return [NSClassFromString(@"CNVoiceToWordsTableViewCell") class]; 506 return [NSClassFromString(@"CNVoiceToWordsTableViewCell") class];
@@ -666,6 +670,14 @@ @@ -666,6 +670,14 @@
666 return CGSizeMake(width, 90*RATIO); 670 return CGSizeMake(width, 90*RATIO);
667 } 671 }
668 break; 672 break;
  673 + case EIMAMSG_TransferBalance:
  674 + {
  675 + if (packMsg.isGroupMsg && ![packMsg isMineMsg]) {
  676 + return CGSizeMake(width, 110*RATIO);
  677 + }
  678 + return CGSizeMake(width, 95*RATIO);
  679 + }
  680 + break;
669 case EIMAMSG_ShareGoods: 681 case EIMAMSG_ShareGoods:
670 { 682 {
671 if (packMsg.isGroupMsg && ![packMsg isMineMsg]) 683 if (packMsg.isGroupMsg && ![packMsg isMineMsg])
CNLiveNewIMAManagerKit/Classes/TIMModel/MSG/IMAMsg.h
@@ -87,6 +87,10 @@ typedef NS_ENUM(NSInteger, IMAMSGType) { @@ -87,6 +87,10 @@ typedef NS_ENUM(NSInteger, IMAMSGType) {
87 EIMAMSG_ShareGift , //分享礼物 87 EIMAMSG_ShareGift , //分享礼物
88 EIMAMSG_SendGiftSuccess , //送礼成功 88 EIMAMSG_SendGiftSuccess , //送礼成功
89 EIMAMSG_ReceviedGiftSuccess , //收礼成功 89 EIMAMSG_ReceviedGiftSuccess , //收礼成功
  90 +#pragma mark 转余额相关消息
  91 + EIMAMSG_TransferBalance, //转余额
  92 + EIMAMSG_TransferExpired, //转余额过期无人领取消息
  93 +
90 #pragma mark 话题新消息提醒 94 #pragma mark 话题新消息提醒
91 EIMAMSG_TopicTip , //话题提醒 95 EIMAMSG_TopicTip , //话题提醒
92 #pragma mark 特群有新的直播 96 #pragma mark 特群有新的直播
@@ -130,6 +134,9 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) { @@ -130,6 +134,9 @@ typedef NS_ENUM(NSUInteger, CustomMsgType) {
130 134
131 CustomMsgTypeSendCard = 1011, //发送名片 135 CustomMsgTypeSendCard = 1011, //发送名片
132 136
  137 + CustomMsgTypeTransferBalance = 1013, //转余额
  138 + CustomMsgTypeTransferExpired = 1014, //转余额过期,无人领取
  139 +
133 CustomMsgTypeReceiveE_BusinessOrder = 1021, //接收到电商订单消息(弃用) 140 CustomMsgTypeReceiveE_BusinessOrder = 1021, //接收到电商订单消息(弃用)
134 CustomMsgTypeE_BusinessOrderPaySuceess = 1022, //电商订单支付成功消息提醒 141 CustomMsgTypeE_BusinessOrderPaySuceess = 1022, //电商订单支付成功消息提醒
135 142
CNLiveNewIMAManagerKit/Classes/TIMModel/MSG/IMAMsg.m
@@ -536,6 +536,16 @@ @@ -536,6 +536,16 @@
536 type = EIMAMSG_SendCard; 536 type = EIMAMSG_SendCard;
537 537
538 } 538 }
  539 + else if ([dic[@"type"] integerValue] == CustomMsgTypeTransferBalance)
  540 + {
  541 + type = EIMAMSG_TransferBalance;
  542 +
  543 + }
  544 + else if ([dic[@"type"] integerValue] == CustomMsgTypeTransferExpired)
  545 + {
  546 + type = EIMAMSG_TransferExpired;
  547 +
  548 + }
539 else if ([dic[@"type"] integerValue] == CustomMsgTypeShareGoods) 549 else if ([dic[@"type"] integerValue] == CustomMsgTypeShareGoods)
540 { 550 {
541 type = EIMAMSG_ShareGoods; 551 type = EIMAMSG_ShareGoods;