Permalink
Browse files

Step 13.32: Add images to chats publication

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 40c9a2c commit 6ee435ffc796b2acecab764935e95974f8c8e172
Showing with 10 additions and 1 deletion.
  1. +10 −1 api/server/publications.ts
@@ -80,7 +80,16 @@ Meteor.publishComposite('chats', function(): PublishCompositeConfig<Chat> {
}, {
fields: { profile: 1 }
});
}
},
children: [
<PublishCompositeConfig2<Chat, User, Picture>> {
find: (user, chat) => {
return Pictures.collection.find(user.profile.pictureId, {
fields: { url: 1 }
});
}
}
]
}
]
};

0 comments on commit 6ee435f

Please sign in to comment.