mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
fixed notifications
This commit is contained in:
parent
3c6f20c679
commit
57408db781
2 changed files with 2 additions and 3 deletions
|
@ -114,7 +114,7 @@ canView = function(user, action){
|
|||
canPost = function(user, action){
|
||||
var user=(typeof user === 'undefined') ? Meteor.user() : user;
|
||||
var action=(typeof action === 'undefined') ? null : action;
|
||||
console.log('canPost', user, action, getSetting('requirePostInvite'));
|
||||
// console.log('canPost', user, action, getSetting('requirePostInvite'));
|
||||
if(Meteor.isClient && !window.settingsLoaded)
|
||||
return false;
|
||||
try{
|
||||
|
@ -135,7 +135,6 @@ canPost = function(user, action){
|
|||
if(action){
|
||||
switch(error){
|
||||
case "no_account":
|
||||
console.log("no account");
|
||||
throwError("Please sign in or create an account first.");
|
||||
action=='replace' ? Router.goto('user_signin') : Router.navigate('signin', {trigger : true});
|
||||
break;
|
||||
|
|
|
@ -158,7 +158,7 @@ Notifications = new Meteor.Collection('notifications');
|
|||
|
||||
Meteor.publish('notifications', function() {
|
||||
// only publish notifications belonging to the current user
|
||||
return Notifications.find({userId:this._id});
|
||||
return Notifications.find({userId:this.userId});
|
||||
});
|
||||
|
||||
Meteor.startup(function(){
|
||||
|
|
Loading…
Add table
Reference in a new issue