Parcourir la source

Commit 11-3: Only sync notifications that are relevant to the user.

Frederic G. MARAND il y a 9 ans
Parent
commit
a3379b13dc
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      server/publications.js

+ 4 - 1
server/publications.js

@@ -10,5 +10,8 @@ Meteor.publish('comments', function(postId) {
 });
 
 Meteor.publish('notifications', function () {
-  return Notifications.find();
+  return Notifications.find({
+    userId: this.userId,
+    read: false
+  });
 });