@@ -147,7 +147,7 @@ -(void)getRecentContactListsuccess:(SUCCESS)suc andError:(ERROR)err{
147147 NSMutableArray *sessionList = [NSMutableArray array ];
148148 for (NIMRecentSession *recent in NIMlistArr) {
149149 NSMutableDictionary *dic = [NSMutableDictionary dictionary ];
150- [dic setObject: recent.session.sessionId forKey: @" contactId" ];
150+ [dic setObject: [ NSString stringWithFormat: @" %@ " , recent.session.sessionId] forKey: @" contactId" ];
151151 [dic setObject: [NSString stringWithFormat: @" %ld " , recent.session.sessionType] forKey: @" sessionType" ];
152152 // 未读
153153 [dic setObject: [NSString stringWithFormat: @" %ld " , recent.unreadCount] forKey: @" unreadCount" ];
@@ -192,7 +192,7 @@ -(void)getResouces{
192192
193193 if (recent.session .sessionType == NIMSessionTypeP2P) {
194194 NSMutableDictionary *dic = [NSMutableDictionary dictionary ];
195- [dic setObject: recent.session.sessionId forKey: @" contactId" ];
195+ [dic setObject: [ NSString stringWithFormat: @" %@ " , recent.session.sessionId] forKey: @" contactId" ];
196196 [dic setObject: [NSString stringWithFormat: @" %ld " , recent.session.sessionType] forKey: @" sessionType" ];
197197 // 未读
198198 NSString *strUnreadCount = [NSString stringWithFormat: @" %ld " , recent.unreadCount];
@@ -223,7 +223,7 @@ -(void)getResouces{
223223 else {
224224 if ( [[NIMSDK sharedSDK ].teamManager isMyTeam: recent.lastMessage.session.sessionId]) {
225225 NSMutableDictionary *dic = [NSMutableDictionary dictionary ];
226- [dic setObject: recent.session.sessionId forKey: @" contactId" ];
226+ [dic setObject: [ NSString stringWithFormat: @" %@ " , recent.session.sessionId] forKey: @" contactId" ];
227227 [dic setObject: [NSString stringWithFormat: @" %ld " , recent.session.sessionType] forKey: @" sessionType" ];
228228 // 未读
229229 NSString *strUnreadCount = [NSString stringWithFormat: @" %ld " , recent.unreadCount];
@@ -255,7 +255,6 @@ -(void)getResouces{
255255 }
256256 }
257257
258- // [NIMModel initShareMD].recentListArr = sessionList;
259258 NSDictionary *recentDict = @{@" recents" :sessionList,@" unreadCount" :[NSString stringWithFormat: @" %zd " ,allUnreadNum]};
260259 [NIMModel initShareMD ].recentDict = recentDict;
261260}
0 commit comments