Skip to content
Permalink
Browse files

Step 7.12: Added messages publication

  • Loading branch information...
dotansimha authored and DAB0mB committed Nov 3, 2016
1 parent 799cf38 commit 98cc094004aaa8a9679f73dc53ae930bd72dd6c7
Showing with 7 additions and 0 deletions.
  1. +7 −0 api/server/publications.ts
@@ -14,4 +14,11 @@ export function initPublications() {
});
});

Meteor.publish('messages', function(chatId: string): Mongo.Cursor<Message> {
if (!this.userId) return;
if (!chatId) return;

return Messages.collection.find({chatId});
});

}

0 comments on commit 98cc094

Please sign in to comment.
You can’t perform that action at this time.