From 407a117a05170f5d5855e2fa4e27d5dad2c86aa6 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Mon, 8 Jul 2024 12:34:46 +0800 Subject: [PATCH] fix: remove repeat append logic. (#2400) --- pkg/common/storage/database/mgo/msg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/storage/database/mgo/msg.go b/pkg/common/storage/database/mgo/msg.go index a7291fcc8..04aa59cef 100644 --- a/pkg/common/storage/database/mgo/msg.go +++ b/pkg/common/storage/database/mgo/msg.go @@ -3,10 +3,11 @@ package mgo import ( "context" "fmt" + "time" + "github.com/openimsdk/open-im-server/v3/pkg/common/storage/database" "github.com/openimsdk/open-im-server/v3/pkg/common/storage/model" "github.com/openimsdk/tools/utils/datautil" - "time" "github.com/openimsdk/protocol/constant" "github.com/openimsdk/protocol/msg" @@ -358,7 +359,6 @@ func (m *MsgMgo) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) ( msgInfo.Msg.ContentType = constant.MsgRevokeNotification msgInfo.Msg.Content = string(content) } - msgs = append(msgs, msgInfo) } //start := (req.Pagination.PageNumber - 1) * req.Pagination.ShowNumber //n := int32(len(msgs))