Skip to content

Commit c4a6cf8

Browse files
guangyaoguangyao
authored andcommitted
add 最近会话列表中,群通知的解析
1 parent 59ece26 commit c4a6cf8

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

ios/RNNeteaseIm/RNNeteaseIm/ContactViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ -(void)adduserId:(NSString *)userId andVerifyType:(NSString *)strType andMag:(NS
327327
[[NIMSDK sharedSDK].userManager requestFriend:request completion:^(NSError *error) {
328328
if (!error) {
329329
success(successText);
330-
[weakSelf sendCustomNotificationContent:msg andSessionID:userId andApnsContent:apnsContent AndData:dataDict shouldBeCounted:NO];
330+
[weakSelf sendCustomNotificationContent:msg andSessionID:userId andApnsContent:apnsContent AndData:dataDict shouldBeCounted:YES];
331331
// [self refresh];
332332
}else{
333333
err(failedText);

ios/RNNeteaseIm/RNNeteaseIm/NIMViewController.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,8 @@ - (NSString *)notificationMessageContent:(NIMMessage *)lastMessage{
433433
return @"[视频聊天]";
434434
}
435435
if (object.notificationType == NIMNotificationTypeTeam) {
436-
NIMTeam *team = [[NIMSDK sharedSDK].teamManager teamById:lastMessage.session.sessionId];
437-
if (team.type == NIMTeamTypeNormal) {
438-
return @"[讨论组信息更新]";
439-
}else{
440-
return @"[群信息更新]";
441-
}
436+
NSString *strContent = [NIMKitUtil teamNotificationFormatedMessage:lastMessage];
437+
return strContent;
442438
}
443439
return @"[未知消息]";
444440
}

ios/RNNeteaseIm/RNNeteaseIm/Util/NIMKitUtil.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@
2424

2525
+ (BOOL)canInviteMember:(NIMTeamMember *)member;
2626

27+
+ (NSString*)teamNotificationFormatedMessage:(NIMMessage *)message;
28+
2729
@end

0 commit comments

Comments
 (0)