Просмотр исходного кода

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

Frederic G. MARAND 9 лет назад
Родитель
Сommit
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
+  });
 });