From 68461308c68c1cedd3810bc6336daa9c65dd95b2 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 19 Apr 2018 13:37:14 -0600 Subject: [PATCH] pull ignored users from db --- graph/mutators/user.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/graph/mutators/user.js b/graph/mutators/user.js index f5bf3c930..68112e732 100644 --- a/graph/mutators/user.js +++ b/graph/mutators/user.js @@ -111,6 +111,15 @@ const delUser = async (ctx, id) => { .setOptions({ multi: true }) .remove(); + // Remove the user from all other user's ignore lists. + await User.update( + { ignoresUsers: user.id }, + { + $pull: { ignoresUsers: user.id }, + }, + { multi: true } + ); + // For each comment that the user has authored, purge the comment data from it // and unset their id from those comments. await transformSingleWithCursor(