|  | @ -143,7 +143,7 @@ class Sessions extends RedisModel {
 | 
												
													
														
															|  |                     business_type: businessType
 |  |                     business_type: businessType
 | 
												
													
														
															|  |                 };
 |  |                 };
 | 
												
													
														
															|  |                 //如果会话已经存在的就不需要发送会话成功的消息不更新最后一条消息
 |  |                 //如果会话已经存在的就不需要发送会话成功的消息不更新最后一条消息
 | 
												
													
														
															|  |                 redis.hexistsAsync(sessionKey, session).then(function(res){
 |  | 
 | 
												
													
														
															|  | 
 |  |                 redis.hexistsAsync(sessionKey, sessionId).then(function(res){
 | 
												
													
														
															|  |                     if(res==0){
 |  |                     if(res==0){
 | 
												
													
														
															|  |                         redis.hmsetAsync(sessionKey, session).then(function () {
 |  |                         redis.hmsetAsync(sessionKey, session).then(function () {
 | 
												
													
														
															|  |                             handler(null, session);
 |  |                             handler(null, session);
 | 
												
											
												
													
														
															|  | @ -1063,7 +1063,7 @@ class Sessions extends RedisModel {
 | 
												
													
														
															|  |                         } else {
 |  |                         } else {
 | 
												
													
														
															|  |                             message.session_id = sessionId;
 |  |                             message.session_id = sessionId;
 | 
												
													
														
															|  |                             res.forEach(function (participant) {
 |  |                             res.forEach(function (participant) {
 | 
												
													
														
															|  |                                 if (participant.id == message.sender_id){
 |  | 
 | 
												
													
														
															|  | 
 |  |                                 if (participant.id == message.sender_id||sessionType==SESSION_TYPES.SYSTEM){
 | 
												
													
														
															|  |                                     message.sender_img = participant.avatar;
 |  |                                     message.sender_img = participant.avatar;
 | 
												
													
														
															|  |                                     // if(participant.participant_role == PARTICIPANT_ROLES.REGULAR){
 |  |                                     // if(participant.participant_role == PARTICIPANT_ROLES.REGULAR){
 | 
												
													
														
															|  |                                     //     if (message.content_type == CONTENT_TYPES.PlainText ||
 |  |                                     //     if (message.content_type == CONTENT_TYPES.PlainText ||
 | 
												
											
												
													
														
															|  | @ -1288,8 +1288,9 @@ class Sessions extends RedisModel {
 | 
												
													
														
															|  |                     res =  JSON.parse(res)
 |  |                     res =  JSON.parse(res)
 | 
												
													
														
															|  |                     if (res.status == 200) {
 |  |                     if (res.status == 200) {
 | 
												
													
														
															|  |                         let data = res.data;
 |  |                         let data = res.data;
 | 
												
													
														
															|  |                         count = JSON.parse(data.imMsgCount).count + data.system.amount + data.healthIndex.amount + data.sign.amount;
 |  | 
 | 
												
													
														
															|  | 
 |  |                         count = parseInt(JSON.parse(data.imMsgCount).count) + parseInt(data.system.amount) + parseInt(data.healthIndex.amount) + parseInt(data.sign.amount);
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                     console.error("sessionType:"+sessionType+"-->res:"+res)
 | 
												
													
														
															|  |                     AppClient.sendNotification(targetUserId, message,sessionType,count);
 |  |                     AppClient.sendNotification(targetUserId, message,sessionType,count);
 | 
												
													
														
															|  |                 });
 |  |                 });
 | 
												
													
														
															|  |             }
 |  |             }
 |