mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
profile.isDummy -> isDummy; don't try to send email on dummy comments
This commit is contained in:
parent
2d42bd5bf3
commit
e61e009196
3 changed files with 8 additions and 8 deletions
|
@ -129,7 +129,7 @@ Telescope.callbacks.add("comments.new.async", CommentsNewUpvoteOwnComment);
|
|||
// add new comment notification callback on comment submit
|
||||
function CommentsNewNotifications (comment) {
|
||||
|
||||
if (typeof Telescope.notifications !== "undefined") {
|
||||
if (typeof Telescope.notifications !== "undefined" && !comment.isDummy) {
|
||||
|
||||
// note: dummy content has disableNotifications set to true
|
||||
if(Meteor.isServer && !comment.disableNotifications){
|
||||
|
|
|
@ -4,7 +4,7 @@ import Comments from "meteor/nova:comments";
|
|||
import Users from 'meteor/nova:users';
|
||||
|
||||
Users.addField({
|
||||
fieldName: '__isDummy',
|
||||
fieldName: 'isDummy',
|
||||
fieldSchema: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
|
@ -40,13 +40,13 @@ Comments.addField({
|
|||
});
|
||||
|
||||
/**
|
||||
* @summary Copy over profile.isDummy to __isDummy on user creation
|
||||
* @summary Copy over profile.isDummy to isDummy on user creation
|
||||
* @param {Object} user – the user object being iterated on and returned
|
||||
* @param {Object} options – user options
|
||||
*/
|
||||
function copyDummyProperty (user, options) {
|
||||
if (typeof user.profile.__isDummy !== "undefined") {
|
||||
user.__isDummy = user.profile.__isDummy;
|
||||
if (typeof user.profile.isDummy !== "undefined") {
|
||||
user.isDummy = user.profile.isDummy;
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
|
|
@ -62,21 +62,21 @@ var createDummyUsers = function () {
|
|||
username: 'Bruce',
|
||||
email: 'dummyuser1@telescopeapp.org',
|
||||
profile: {
|
||||
__isDummy: true
|
||||
isDummy: true
|
||||
}
|
||||
});
|
||||
Accounts.createUser({
|
||||
username: 'Arnold',
|
||||
email: 'dummyuser2@telescopeapp.org',
|
||||
profile: {
|
||||
__isDummy: true
|
||||
isDummy: true
|
||||
}
|
||||
});
|
||||
Accounts.createUser({
|
||||
username: 'Julia',
|
||||
email: 'dummyuser3@telescopeapp.org',
|
||||
profile: {
|
||||
__isDummy: true
|
||||
isDummy: true
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue