File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
RNNeteaseIm.xcodeproj/project.xcworkspace/xcuserdata/Dowin.xcuserdatad Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ -(void)setAllread{
252252// 同意
253253-(void )onAccept : (NSString *)targetID timestamp : (NSString *)timestamp sucess : (Success)success error : (Errors)err {
254254
255-
255+ __weak typeof (self)weakSelf = self;
256256 for (int i = 0 ; i < _notiArr.count ; i++) {
257257 if ([targetID isEqualToString: [[_notiArr objectAtIndex: i] objectForKey: @" fromAccount" ]]) {
258258 if ([timestamp isEqualToString: [[_notiArr objectAtIndex: i] objectForKey: @" time" ]]) {
@@ -320,6 +320,7 @@ -(void)onAccept:(NSString *)targetID timestamp:(NSString *)timestamp sucess:(Suc
320320 [self updateSourceMember: sourceMember andNoti: notices];
321321 }
322322 success (@" 同意成功" );
323+ [weakSelf sendMakeFriendSucessMessgae: request.userId];
323324 [self refrash ];
324325 }
325326 else
@@ -340,6 +341,21 @@ -(void)onAccept:(NSString *)targetID timestamp:(NSString *)timestamp sucess:(Suc
340341
341342
342343}
344+
345+
346+ // 发送成为好友提醒
347+ - (void )sendMakeFriendSucessMessgae : (NSString *)strUserId {
348+ NIMMessage *message = [[NIMMessage alloc ] init ];
349+ message.text = @" 我们已经是朋友啦,一起来聊天吧!" ;
350+ NIMMessageSetting *setting = [[NIMMessageSetting alloc ]init];
351+ setting.apnsEnabled = NO ;
352+ message.setting = setting;
353+ NIMSession *session = [NIMSession session: strUserId type: NIMSessionTypeP2P];
354+ // 发送消息
355+ [[NIMSDK sharedSDK ].chatManager sendMessage: message toSession: session error: nil ];
356+ }
357+
358+
343359// 拒绝
344360-(void )onRefuse : (NSString *)targetID timestamp : (NSString *)timestamp sucess : (Success)success error : (Errors)err {
345361 for (int i = 0 ; i < _notiArr.count ; i++) {
Original file line number Diff line number Diff line change @@ -599,7 +599,7 @@ -(void)setSendState{
599599 break ;
600600 case 6 :
601601 // 系统通知未读条数
602- [_bridge.eventDispatcher sendDeviceEventWithName: @" observeUnreadCount " body: param];
602+ [_bridge.eventDispatcher sendDeviceEventWithName: @" observeUnreadCountChange " body: param];
603603 break ;
604604 case 7 :
605605 // 聊天记录
You can’t perform that action at this time.
0 commit comments