...
|
...
|
@@ -267,8 +267,12 @@ func (l *MiniBusinessLogic) createMessage( |
|
|
at []int64) (err error) {
|
|
|
|
|
|
var userToken = contextdata.GetUserTokenFromCtx(l.ctx)
|
|
|
// 评论中携带了 @其他用户
|
|
|
var dupMap = make(map[int64]int64, 0)
|
|
|
// 评论中携带了 @用户
|
|
|
for i := range at {
|
|
|
if _, ok := dupMap[at[i]]; ok { /* ID去重 */
|
|
|
// do nothing ...
|
|
|
} else {
|
|
|
var msg = &domain.MessageBusiness{
|
|
|
Type: msgType,
|
|
|
OptType: optType,
|
...
|
...
|
@@ -283,6 +287,9 @@ func (l *MiniBusinessLogic) createMessage( |
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
dupMap[at[i]] = at[i]
|
|
|
}
|
|
|
|
|
|
}
|
|
|
return nil
|
|
|
}
|
...
|
...
|
|