Notifications = new Mongo.Collection('notifications');

Notifications.allow({
    update: function(userId, doc, fieldNames) {
        return ownsDocument(userId, doc) &&
                fieldNames.length == 1 && fieldNames[0] == 'read';
    }
});

createCommentNotification = function(comment) {

    var now = new Date(),
        user = Meteor.user(),
        offer = Offers.findOne(offer.offerId);

    if (user !== offer.selectedItemOwner) {

        Notifications.insert({
            receiverId: offer.selectedItemOwner,
            receiverName: offer.selectedItemOwnerName,
            commenterId: offer.offeredItemId,
            commenterName: offer.offeredItemOwnerName,
            read: false
        })
        }
    // if currentUser/senderId !== selectedItemOwner
    //   receiverId = selectedItemOwner
    // else
    //   if currentUser/senderId !== offeredItemOwner
    //      receiverId = offeredItemOwner
};

@@ -709,16 +709,325 @@
       %7D)
+;%0A    %7D%0A    if (user != offer.offeredItemOwner) %7B%0A        Notifications.insert(%7B%0A            receiverId: offer.offeredItemOwner,%0A            receiverName: offer.offeredItemOwnerName,%0A            commenterId: offer.selectedItemId,%0A            commenterName: offer.selectedItemOwnerName,%0A            read: false
 %0A       
@@ -1024,24 +1024,33 @@
 se%0A        %7D
+);%0A    %7D%0A
 %0A    // if c

create comment notif cont'd'