mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-05 17:56:50 +08:00
1
This commit is contained in:
parent
3e344c16a2
commit
3f739459db
@ -4,6 +4,7 @@ import (
|
||||
chat "Open_IM/internal/rpc/msg"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db"
|
||||
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
rocksCache "Open_IM/pkg/common/db/rocks_cache"
|
||||
"Open_IM/pkg/common/log"
|
||||
@ -43,14 +44,15 @@ type friendServer struct {
|
||||
|
||||
func NewFriendServer(port int) *friendServer {
|
||||
log.NewPrivateLog(constant.LogFileName)
|
||||
DB := db.DB.MysqlDB.DefaultGormDB()
|
||||
return &friendServer{
|
||||
rpcPort: port,
|
||||
rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName,
|
||||
etcdSchema: config.Config.Etcd.EtcdSchema,
|
||||
etcdAddr: config.Config.Etcd.EtcdAddr,
|
||||
friendModel: imdb.NewFriend(nil), // TODO
|
||||
friendRequestModel: imdb.NewFriendRequest(nil),
|
||||
blackModel: imdb.NewBlack(nil),
|
||||
friendModel: imdb.NewFriend(DB),
|
||||
friendRequestModel: imdb.NewFriendRequest(DB),
|
||||
blackModel: imdb.NewBlack(DB),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user