feat: syncs across document deletions

This commit is contained in:
Daniel Avila 2023-03-22 19:53:09 -04:00
parent 97634865eb
commit 719413f87a

View file

@ -193,7 +193,7 @@ module.exports = function mongoMeili(schema, options) {
schema.post('remove', function (doc) {
doc.postRemoveHook();
});
schema.post('deleteMany', function (doc) {
schema.post('deleteMany', function () {
// console.log('deleteMany hook', doc);
if (Object.prototype.hasOwnProperty.call(schema.obj, 'messages')) {
console.log('Syncing convos...');