Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks
https://atmospherejs.com/matb33/collection-hooks
MIT License
657 stars 92 forks source link

Moved getUserId() to CollectionHooks.getUserId() #96

Closed cristo-rabani closed 9 years ago

cristo-rabani commented 9 years ago

It will be nice if getUserId() function will be accessible from outside. I make functionality with using your package and I don't want wraps second time doing the same like you do in Meteor.publish. I hope that it isn't any problem ?

matb33 commented 9 years ago

Out of curiosity, is there a reason you are using that getUserId() instead of Meteor.userId()?

mizzao commented 9 years ago

Probably to access it during Meteor.publish. I think I had this case as well, but I managed to use it entirely from the hook provided userId.

cristo-rabani commented 9 years ago

I made method that can be used in Meteor.Publish as well. Waiting killed my patience, and I have already implemented the same wrapping function on Meteor.Publish as this plugin. Potentially one relation less.

matb33 commented 9 years ago

I was publishing a bug fix and remembered that you had asked for this -- I quickly added it to 0.7.13