fix: changing naming irregularities under pkg and internal packages, #520

pull/536/head
BanTanger 2 years ago
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…
Cancel
Save