Create new notifications collection
- Notifications collection is a new Meteor collection in MongoDB that will handle user notifications
Allow Notifications to update
- Notifications collection is allowed to be updated via a Method
Add createCommentNotification function
- This function takes a comment as a parameter
- This function finds the post by using the postId variable in comment
- Verifies that the comment userId is not the same as the post.userId
- Inserts Notification into the notification table
Call createCommentNotification in Comments collection
- Save the _id of our newly created comment in a variable
- Call createCommentNotification passing in the comment to create notifications associated with that new comment
- Returns the comment._id
Publish the Notifications
- Add publication to Notifications on server-side of the application
- This returns all Notifications located in Notifications table of the database
Subscribe to Notifications on client-side
- Add subscription to Notifications table for all clients
- This will load all Notifications on the client-side and reload them when they are detected changes/publications
Merge pull request #29 from alexanderdavidpan/Add_Basic_Notifications_Collection

Add basic notifications collection