This commit is contained in:
wangchuxiao 2023-03-10 12:20:01 +08:00
parent 4f0813889c
commit a9c093ac59

View File

@ -120,6 +120,9 @@ func (m *MsgMongoDriver) GetOldestMsg(ctx context.Context, sourceID string) (*ta
}
func (m *MsgMongoDriver) Delete(ctx context.Context, docIDs []string) error {
if docIDs == nil {
return nil
}
_, err := m.MsgCollection.DeleteMany(ctx, bson.M{"uid": bson.M{"$in": docIDs}})
return err
}