summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/boards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 02f28b5a..3051ef1e 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -494,6 +494,18 @@ if (Meteor.isServer) {
const board = Boards._transform(doc);
board.setWatcher(memberId, false);
+
+ // Remove board from users starred list
+ if (!board.isPublic()) {
+ Users.update(
+ memberId,
+ {
+ $pull: {
+ 'profile.starredBoards': boardId,
+ },
+ }
+ );
+ }
});
}
});