Merge remote-tracking branch 'origin/main' into add-new-feature-#484

# Conflicts:
#	pkg/common/db/unrelation/extend_msg.go
This commit is contained in:
plutoyty
2023-07-12 19:16:48 +08:00
154 changed files with 7800 additions and 10503 deletions
-4
View File
@@ -107,10 +107,6 @@ func (m *Mongo) CreateSuperGroupIndex() error {
return nil
}
func (m *Mongo) CreateExtendMsgSetIndex() error {
return m.createMongoIndex(unrelation.CExtendMsgSet, true, "-create_time", "work_moment_id")
}
func (m *Mongo) createMongoIndex(collection string, isUnique bool, keys ...string) error {
db := m.db.Database(config.Config.Mongo.Database).Collection(collection)
opts := options.CreateIndexes().SetMaxTime(10 * time.Second)