Explorar el Código

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

Frederic G. MARAND hace 9 años
padre
commit
a3379b13dc
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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
+  });
 });