mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 09:36:00 +08:00
fix get groups bug (#562)
* fix get group bug Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> * bug * api 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:
@@ -16,7 +16,6 @@ package msg
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
|
||||
@@ -189,3 +188,7 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbMsg.SendMsgReq
|
||||
return resp, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (m *msgServer) BatchSendMsg(ctx context.Context, in *pbMsg.BatchSendMessageReq) (*pbMsg.BatchSendMessageResp, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package msg
|
||||
import (
|
||||
"context"
|
||||
|
||||
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
@@ -83,12 +84,7 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
||||
userRpcClient := rpcclient.NewUserRpcClient(client)
|
||||
groupRpcClient := rpcclient.NewGroupRpcClient(client)
|
||||
friendRpcClient := rpcclient.NewFriendRpcClient(client)
|
||||
mysql, err := relation.NewGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
msgMysModel := relation.NewChatLogGorm(mysql)
|
||||
msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel, msgMysModel)
|
||||
msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel)
|
||||
s := &msgServer{
|
||||
Conversation: &conversationClient,
|
||||
User: &userRpcClient,
|
||||
|
||||
@@ -131,7 +131,7 @@ func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pbChatLog.SenderNickname = recvUser.Nickname
|
||||
pbChatLog.RecvNickname = recvUser.Nickname
|
||||
|
||||
case constant.GroupChatType, constant.SuperGroupChatType:
|
||||
group, err := m.Group.GetGroupInfo(ctx, chatLog.GroupID)
|
||||
|
||||
Reference in New Issue
Block a user