* message for your changes

Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’>

* debug

Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’>

* Delete start.bat

* Delete build.cmd

---------

Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’>
Co-authored-by: ‘hanzhixiao’ <‘709674996@qq.com’>
This commit is contained in:
Alan
2023-07-14 20:40:41 +08:00
committed by GitHub
parent 16a851d951
commit 0c23b3a443
5 changed files with 20 additions and 22 deletions
+3 -4
View File
@@ -108,11 +108,11 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd
func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) (resp *msg.SearchMessageResp, err error) {
var chatLogs []*sdkws.MsgData
var total int32
resp = &msg.SearchMessageResp{}
if chatLogs, err = m.MsgDatabase.SearchMessage(ctx, req); err != nil {
if total, chatLogs, err = m.MsgDatabase.SearchMessage(ctx, req); err != nil {
return nil, err
}
var num int
for _, chatLog := range chatLogs {
pbChatLog := &msg.ChatLog{}
utils.CopyStructFields(pbChatLog, chatLog)
@@ -146,9 +146,8 @@ func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq
pbChatLog.GroupType = group.GroupType
}
resp.ChatLogs = append(resp.ChatLogs, pbChatLog)
num++
}
resp.ChatLogsNum = int32(num)
resp.ChatLogsNum = total
return resp, nil
}