mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-20 00:39:01 +08:00
Merge branch 'superGroup' into v2.3.0release
# Conflicts: # go.sum # pkg/common/db/RedisModel.go # pkg/common/db/model.go
This commit is contained in:
@@ -196,6 +196,10 @@ type config struct {
|
||||
Intent string `yaml:"intent"`
|
||||
MasterSecret string `yaml:"masterSecret"`
|
||||
}
|
||||
Fcm struct {
|
||||
ServiceAccount string `yaml:"serviceAccount"`
|
||||
Enable bool `yaml:"enable"`
|
||||
}
|
||||
}
|
||||
Manager struct {
|
||||
AppManagerUid []string `yaml:"appManagerUid"`
|
||||
|
||||
@@ -31,9 +31,10 @@ const (
|
||||
SignalCache = "SIGNAL_CACHE:"
|
||||
SignalListCache = "SIGNAL_LIST_CACHE:"
|
||||
GlobalMsgRecvOpt = "GLOBAL_MSG_RECV_OPT"
|
||||
FcmToken = "FCM_TOKEN:"
|
||||
groupUserMinSeq = "GROUP_USER_MIN_SEQ:"
|
||||
groupMaxSeq = "GROUP_MAX_SEQ"
|
||||
)
|
||||
)
|
||||
|
||||
func (d *DataBases) JudgeAccountEXISTS(account string) (bool, error) {
|
||||
key := accountTempCode + account
|
||||
|
||||
@@ -38,6 +38,7 @@ type RedisClient struct {
|
||||
client *go_redis.Client
|
||||
cluster *go_redis.ClusterClient
|
||||
go_redis.UniversalClient
|
||||
enableCluster bool
|
||||
}
|
||||
|
||||
func key(dbAddress, dbName string) string {
|
||||
@@ -58,10 +59,10 @@ func init() {
|
||||
uri = config.Config.Mongo.DBUri
|
||||
} else {
|
||||
if config.Config.Mongo.DBPassword != "" && config.Config.Mongo.DBUserName != "" {
|
||||
uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d", config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, config.Config.Mongo.DBAddress,
|
||||
uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d&authSource=admin", config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, config.Config.Mongo.DBAddress,
|
||||
config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize)
|
||||
} else {
|
||||
uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d",
|
||||
uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d&authSource=admin",
|
||||
config.Config.Mongo.DBAddress, config.Config.Mongo.DBDatabase,
|
||||
config.Config.Mongo.DBMaxPoolSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user