summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-24 14:18:12 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-24 14:18:12 +0100
commit0430ba560426ba3e53ab8442323924b158e3d6f3 (patch)
tree156514eb1c6bffc989b99275db740b857830ab9a /server.js
parentb7423293ea7671f0e662d8c4e70056fbe5eaeb7d (diff)
downloadserver-0430ba560426ba3e53ab8442323924b158e3d6f3.tar.gz
Tweak mail messages.
Diffstat (limited to 'server.js')
-rw-r--r--server.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/server.js b/server.js
index 86f826d..ee63b94 100644
--- a/server.js
+++ b/server.js
@@ -1364,7 +1364,7 @@ app.get('/:title_id/play\::game_id', function (req, res) {
*/
const MAIL_FROM = process.env.MAIL_FROM || "Rally the Troops! <notifications@rally-the-troops.com>";
-const MAIL_FOOTER = "You can unsubscribe from notifications on your profile page:\n\nhttps://rally-the-troops.com/profile\n";
+const MAIL_FOOTER = "You can unsubscribe from notifications on your profile page:\nhttps://rally-the-troops.com/profile\n";
const SQL_SELECT_NOTIFIED = SQL("SELECT datetime('now') < datetime(time,?) FROM last_notified WHERE game_id=? AND user_id=?").pluck();
const SQL_INSERT_NOTIFIED = SQL("INSERT OR REPLACE INTO last_notified (game_id,user_id,time) VALUES (?,?,datetime('now'))");
@@ -1404,9 +1404,9 @@ function mail_password_reset_token(user, token) {
function mail_new_message(user, msg_id, msg_from, msg_subject, msg_body) {
let subject = "You have a new message from " + msg_from + ".";
let body = "Subject: " + msg_subject + "\n\n" +
- msg_body + "\n\n" +
- "https://rally-the-troops.com/message/read/" + msg_id + "\n\n" +
- MAIL_FOOTER;
+ msg_body + "\n\n--\n" +
+ "You can reply to this message at:\n"
+ "https://rally-the-troops.com/message/read/" + msg_id + "\n\n";
console.log("SENT MAIL:", mail_addr(user), subject);
if (mailer)
mailer.sendMail({ from: MAIL_FROM, to: mail_addr(user), subject: subject, text: body }, mail_callback);
@@ -1420,7 +1420,7 @@ function mail_your_turn_notification(user, game_id, interval) {
let subject = game.title_name + " - " + game_id + " - Your turn!";
let body = mail_describe(game) +
"It's your turn.\n\n" +
- "https://rally-the-troops.com/play/" + game_id + "\n\n" +
+ "https://rally-the-troops.com/play/" + game_id + "\n\n--\n" +
MAIL_FOOTER;
console.log("SENT MAIL:", mail_addr(user), subject);
if (mailer)
@@ -1440,7 +1440,7 @@ function mail_ready_to_start_notification(user, game_id, interval) {
let subject = game.title_name + " - " + game_id + " - Ready to start!";
let body = mail_describe(game) +
"Your game is ready to start.\n\n" +
- "https://rally-the-troops.com/join/" + game_id + "\n\n" +
+ "https://rally-the-troops.com/join/" + game_id + "\n\n--\n" +
MAIL_FOOTER;
console.log("SENT MAIL:", mail_addr(user), subject);
if (mailer)