Jelajahi Sumber

feat: 群聊消息发送方存储

zhangxinlei1996 2 tahun lalu
induk
melakukan
c4c3fbeedc
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  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)
 						//接收人其他用户