Fix notifications in case of new corr move
[vchess.git] / server / models / User.js
index bd7e8ed..d0b105d 100644 (file)
@@ -135,14 +135,14 @@ const UserModel =
   {
     const subject = "vchess.club - notification";
     const body = "Hello " + user.name + "!" + `
-    ` + message;
+` + message;
     sendEmail(params.mail.noreply, user.email, subject, body);
   },
 
   tryNotify: function(id, message)
   {
     UserModel.getOne("id", id, (err,user) => {
-      if (!err || !user.notify)
+      if (!!err || !user.notify)
         return; //NOTE: error is ignored here
       UserModel.notify(user, message);
     });