-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send email about LessOnline #9223
base: master
Are you sure you want to change the base?
Conversation
…DMaboutLessOnline
…DMaboutLessOnline
throw new Error("No site name configured. Make sure \"title\" is set in your settings.json."); | ||
} | ||
const taggedSubject = `[${sitename}] ${subject}`; | ||
// const sitename = forumTitleSetting.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be an optional flag added to the function, rather than an in-place change.
@@ -78,7 +78,8 @@ export const getSiteUrl = function (): string { | |||
if (url.slice(-1) !== '/') { | |||
url += '/'; | |||
} | |||
return url; | |||
// return url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to change the siteUrlSetting (the siteUrl
instance setting) and leave a comment in the script itself that it needs to be changed to avoid sending out urls with localhost in them
@@ -279,24 +279,25 @@ function validateSheets(sheetsRegistry: typeof SheetsRegistry) | |||
const enableDevelopmentEmailsSetting = new DatabaseServerSetting<boolean>('enableDevelopmentEmails', false) | |||
async function sendEmail(renderedEmail: RenderedEmail): Promise<boolean> | |||
{ | |||
if (process.env.NODE_ENV === 'production' || enableDevelopmentEmailsSetting.get()) { | |||
|
|||
// if (process.env.NODE_ENV === 'production' || enableDevelopmentEmailsSetting.get()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commenting this out is unnecessary; you can just append --production
to yarn start-prod-db
await wrapAndSendEmail({ | ||
user: user, | ||
subject: "LessOnline: A Festival of Truth-Seeking and Blogging (May 31 — Jun 2, Berkeley CA)", | ||
body: LessOnlineEmail() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any reason to make this a function if it's always returning the same thing
// const users = await Users.find({ | ||
// lastNotificationsCheck: {$gt: new Date("2020-01-01")}, | ||
// $or: [{ banned: { $exists: false } }, { banned: { $lte: new Date() } }], | ||
// karma: {$gte: 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget deleted: false
, and then also { sort: { createdAt: 1 } }
in the options
┆Issue is synchronized with this Asana task by Unito