meteor-collection-hooks icon indicating copy to clipboard operation
meteor-collection-hooks copied to clipboard

Use DDP._CurrentPublicationInvocation to get userId

Open zimme opened this issue 8 years ago • 3 comments

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.

zimme avatar May 31 '17 15:05 zimme

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 avatar Nov 20 '17 19:11 gregory

@gregory I would happily accept a PR for this =)

zimme avatar Nov 20 '17 19:11 zimme

Thanks @zimme - Not a blocker, will try to find some time for this :)

gregory avatar Nov 22 '17 23:11 gregory