meteor-collection-hooks
meteor-collection-hooks copied to clipboard
Use DDP._CurrentPublicationInvocation to get userId
Let's use DDP._CurrentPublicationInvocation to get the userId if it's available, otherwise fall back to the current method to be backwards-compatible.
Possible since https://github.com/meteor/meteor/pull/8629.
it's crazy how much time code is spent in the try/catch - would be much more efficient to rely on DDP._CurrentMethodInvocation.get() || DDP._CurrentPublicationInvocation.get();
@gregory I would happily accept a PR for this =)
Thanks @zimme - Not a blocker, will try to find some time for this :)