Преглед на файлове

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

Frederic G. MARAND преди 9 години
родител
ревизия
a3379b13dc
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  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
+  });
 });