mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-11 15:32:25 +08:00
fix: changing naming irregularities under pkg and internal packages, #520
This commit is contained in:
parent
843611759b
commit
5a0400b88f
@ -57,15 +57,15 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
||||
pbGroup.RegisterGroupServer(server, &groupServer{
|
||||
GroupDatabase: database,
|
||||
User: userRPCClient,
|
||||
Notification: notification.NewGroupNotificationSender(database, &msgRpcClient, &userRpcClient, func(ctx context.Context, userIDs []string) ([]notification.CommonUser, error) {
|
||||
Notification: notification.NewGroupNotificationSender(database, &msgRPCClient, &userRPCClient, func(ctx context.Context, userIDs []string) ([]notification.CommonUser, error) {
|
||||
users, err := userRPCClient.GetUsersInfo(ctx, userIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return utils.Slice(users, func(e *sdkws.UserInfo) notification.CommonUser { return e }), nil
|
||||
}),
|
||||
conversationRpcClient: conversationRPCClient,
|
||||
msgRpcClient: msgRPCClient,
|
||||
conversationRPCClient: conversationRPCClient,
|
||||
msgRPCClient: msgRPCClient,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ func InitMsgTool() (*MsgTool, error) {
|
||||
groupDatabase := controller.InitGroupDatabase(db, rdb, mongo.GetDatabase())
|
||||
conversationDatabase := controller.NewConversationDatabase(relation.NewConversationGorm(db), cache.NewConversationRedis(rdb, cache.GetDefaultOpt(), relation.NewConversationGorm(db)), tx.NewGorm(db))
|
||||
msgRpcClient := rpcclient.NewMessageRpcClient(discov)
|
||||
msgNotificationSender := notification.NewMsgNotificationSender(rpcclient.WithRpcClient(&msgRpcClient))
|
||||
msgNotificationSender := notification.NewMsgNotificationSender(rpcclient.WithRPCClient(&msgRpcClient))
|
||||
msgTool := NewMsgTool(msgDatabase, userDatabase, groupDatabase, conversationDatabase, msgNotificationSender)
|
||||
return msgTool, nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user