From 0168ef40146c6dbef1db56dc2df35963e4c7bc00 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 30 May 2022 17:46:11 +0800 Subject: [PATCH] superGroup --- pkg/common/db/mongoModel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 4325ce02a..81844b9f9 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -1106,7 +1106,7 @@ func (d *DataBases) RemoveGroupFromUser(ctx, sCtx context.Context, groupID strin }) } c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - _, err := c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$pull": bson.M{"group_id_list": groupID}}) + _, err := c.UpdateOne(sCtx, bson.M{"user_id": bson.M{"$in": userID}}, bson.M{"$pull": bson.M{"group_id_list": groupID}}) if err != nil { return utils.Wrap(err, "UpdateOne transaction failed") }