2013-04-14 14:51:37 +09:00
|
|
|
// Session variables
|
2015-09-17 14:51:14 +09:00
|
|
|
Session.set('appIsReady', false);
|
2013-02-18 13:38:15 +09:00
|
|
|
|
2014-07-15 07:45:37 +09:00
|
|
|
Meteor.startup(function () {
|
2015-09-18 17:18:18 +09:00
|
|
|
var link = {rel: "alternate", type: "application/rss+xml", href: "/feed.xml", title: i18n.t("new_posts")};
|
|
|
|
DocHead.addLink(link);
|
2014-11-29 11:14:44 +09:00
|
|
|
});
|
|
|
|
|
2015-09-17 14:51:14 +09:00
|
|
|
// Global Subscriptions
|
2015-05-01 18:22:00 +02:00
|
|
|
|
2015-09-18 16:27:59 +09:00
|
|
|
Telescope.subsManager = new SubsManager({
|
|
|
|
// cache recent 50 subscriptions
|
|
|
|
cacheLimit: 50,
|
|
|
|
// expire any subscription after 30 minutes
|
|
|
|
expireIn: 30
|
|
|
|
});
|
|
|
|
|
2015-09-17 14:51:14 +09:00
|
|
|
Telescope.subscriptions.preload('settings');
|
|
|
|
Telescope.subscriptions.preload('currentUser');
|
2015-04-01 11:00:31 +09:00
|
|
|
|
2015-09-17 14:51:14 +09:00
|
|
|
FlowRouter.subscriptions = function() {
|
|
|
|
var flow = this;
|
|
|
|
Telescope.subscriptions.forEach(function (sub) {
|
|
|
|
if (typeof sub === 'object'){
|
|
|
|
flow.register(sub.subName, Meteor.subscribe(sub.subName, sub.subArguments));
|
|
|
|
}else{
|
|
|
|
flow.register(sub, Meteor.subscribe(sub));
|
|
|
|
}
|
|
|
|
});
|
2015-09-18 16:27:59 +09:00
|
|
|
};
|