diff --git a/README.md b/README.md index c872fe2..6a807fe 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Fast Render can improve the initial load time of your app, giving you 2-10 times - [Client Error: "Server sent add for existing id"](#client-error-server-sent-add-for-existing-id) - [No data is injected when using "AppCache" package](#no-data-is-injected-when-using-appcache-package) - [No data is injected when using Meteor Subscription Cache](#no-data-is-injected-when-using-meteor-subscription-cache) + - [No support for publication strategies](#no-support-for-publication-strategies) - [Debugging](#debugging) - [Block DDP](#block-ddp) - [Get Payload](#get-payload) @@ -205,6 +206,10 @@ Related Issue & Discussion: When using the subscache package (`ccorcos:subs-cache` or `blockrazor:subscache-c4`) the parameters passed to the subscription must the identical on both Fast Render and Subscache or no data will be injected. +### No support for publication strategies + +This package could affect the behavior of non-default [publication strategies](https://docs.meteor.com/api/pubsub.html#Publication-strategies). + ## Debugging Sometimes, you need to test whether Fast Render is working or not. You can do this using the built-in debugger. The debugger works on the client and is safe to run it on a deployed app. It has a few useful features: diff --git a/lib/server/publish_context.js b/lib/server/publish_context.js index 049fb5d..9b9de49 100644 --- a/lib/server/publish_context.js +++ b/lib/server/publish_context.js @@ -11,9 +11,19 @@ const PublishContext = function PublishContext ( params, name, ) { + // mock server + const server = { + getPublicationStrategy() { + return { + useCollectionView: true, + doAccountingForCollection: true, + } + } + } // mock session const sessionId = Random.id(); const session = { + server, id: sessionId, userId: context.userId, // not null