Skip to content

Commit

Permalink
Step 13.32: Add images to chats publication
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and darkbasic committed Oct 16, 2017
1 parent 40c9a2c commit 6ee435f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion api/server/publications.ts
Expand Up @@ -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 }
});
}
}
]
}
]
};
Expand Down

0 comments on commit 6ee435f

Please sign in to comment.