소스 검색

feat: 群聊消息发送方存储

zhangxinlei1996 2 년 전
부모
커밋
c4c3fbeedc
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      service/message_mail_box.go

+ 6 - 6
service/message_mail_box.go

@@ -1030,13 +1030,13 @@ func (this *MessaggeService) Chat(in *messagecenter.MessageEntity) (fool bool, e
 			for _, v := range in.GroupIds {
 				args := []interface{}{}
 				groupUser := GetUserByGroupId(tx, v, in.SendId)
+				//发送人自己
+				if !isWithdrawByOthers {
+					args = append(args, in.Appid, messageId, in.ItemType, in.SendId, 2, in.SendId, 2, 2, in.SendId, nowTime, v, 1)
+					//最后一次聊天
+					SocializeSummaryAddOrUpdate(tx, v, in.SendId, 0, messageId, isCustomerServiceAccess, nowTime)
+				}
 				for _, vv := range groupUser {
-					//发送人自己
-					if !isWithdrawByOthers {
-						args = append(args, in.Appid, messageId, in.ItemType, in.SendId, 2, vv, 2, 2, in.SendId, nowTime, v, 1)
-						//最后一次聊天
-						SocializeSummaryAddOrUpdate(tx, v, in.SendId, 0, messageId, isCustomerServiceAccess, nowTime)
-					}
 					if !isWithdrawByMyself {
 						log.Println("获取到群组下员工:", vv)
 						//接收人其他用户