|
@@ -49,10 +49,14 @@ func (l *MessageAddLogic) MessageAdd(req *types.MessageEntity) (*types.CommonRes
|
|
for _, v := range req.GroupIds {
|
|
for _, v := range req.GroupIds {
|
|
groupIds = append(groupIds, gconv.Int64(encrypt.SE.Decode4Hex(v)))
|
|
groupIds = append(groupIds, gconv.Int64(encrypt.SE.Decode4Hex(v)))
|
|
}
|
|
}
|
|
|
|
+ sendId := quitl.Int64All(encrypt.SE.Decode4Hex(req.SendId))
|
|
|
|
+ if req.SendId == "" {
|
|
|
|
+ sendId = req.PositionId
|
|
|
|
+ }
|
|
resp, err := l.svcCtx.Message.SaveMessage(l.ctx, &messagecenter.MessageEntity{
|
|
resp, err := l.svcCtx.Message.SaveMessage(l.ctx, &messagecenter.MessageEntity{
|
|
OwnType: req.OwnType,
|
|
OwnType: req.OwnType,
|
|
Title: req.Title,
|
|
Title: req.Title,
|
|
- SendId: quitl.Int64All(encrypt.SE.Decode4Hex(req.SendId)),
|
|
|
|
|
|
+ SendId: sendId,
|
|
Content: quitl.ObjToString(quitl.If(req.Type == 3 || req.Type == 4 || req.Type == 5, fsw.Repl(req.Content), htmlFilter.Sanitize(fsw.Repl(req.Content)))),
|
|
Content: quitl.ObjToString(quitl.If(req.Type == 3 || req.Type == 4 || req.Type == 5, fsw.Repl(req.Content), htmlFilter.Sanitize(fsw.Repl(req.Content)))),
|
|
Item: req.Item,
|
|
Item: req.Item,
|
|
Type: quitl.Int64All(quitl.If(req.Type == 5, 1, req.Type)),
|
|
Type: quitl.Int64All(quitl.If(req.Type == 5, 1, req.Type)),
|