File tree Expand file tree Collapse file tree 8 files changed +20
-19
lines changed
Expand file tree Collapse file tree 8 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 22PORT = 3005
33
44# name of the app that sends the emails - featured in the message subject or body
5- APP_NAME = Tired.bike
6- APP_URL = https://tired.bike
5+ APP_NAME = SolidCouch
6+ APP_URL = https://app.solidcouch.org
77# provide path to a logo to display on top of emails - keep it small!
88# absolute path, or relative path to the base of the project
99APP_LOGO = ./logo.png
10- SUPPORT_EMAIL = support@tired.bike
10+ SUPPORT_EMAIL = support@solidcouch.org
1111
1212# server base url, e.g. to construct correct email verification link
1313# this is the base url that end users see
@@ -42,7 +42,7 @@ SMTP_TRANSPORT_AUTH_PASS=
4242SMTP_TRANSPORT_REQUIRE_TLS =
4343
4444# email address which will be the sender of the notifications and email verification messages
45- EMAIL_SENDER = noreply@notifications.tired.bike
45+ EMAIL_SENDER = noreply@notifications.solidcouch.org
4646
4747# JWT
4848# path to JWT (private) key
Original file line number Diff line number Diff line change 11The MIT License (MIT)
22
3- Copyright (c) 2023 Tired Bike
3+ Copyright (c) 2023 SolidCouch contributors
44
55Permission is hereby granted, free of charge, to any person obtaining a copy
66of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change @@ -14,14 +14,15 @@ export const baseUrl =
1414 ? `http://localhost:${ port } `
1515 : process . env . BASE_URL
1616
17- export const appName = process . env . APP_NAME ?? 'Tired.bike '
17+ export const appName = process . env . APP_NAME ?? 'SolidCouch '
1818
19- export const appUrl = process . env . APP_URL ?? 'https://tired.bike '
19+ export const appUrl = process . env . APP_URL ?? 'https://app.solidcouch.org '
2020
21- // default is tired.bike logo
21+ // default is SolidCouch logo
2222export const appLogo = process . env . APP_LOGO ?? './logo.png'
2323
24- export const supportEmail = process . env . SUPPORT_EMAIL ?? 'support@tired.bike'
24+ export const supportEmail =
25+ process . env . SUPPORT_EMAIL ?? 'support@solidcouch.org'
2526
2627// identity under which the mailer is operating
2728export const mailerCredentials = {
@@ -56,7 +57,7 @@ export const smtpTransportOptions: SMTPTransport.Options = {
5657
5758// email address which will be the sender of the notifications and email verification messages
5859export const emailSender =
59- process . env . EMAIL_SENDER ?? 'noreply@notifications.tired.bike '
60+ process . env . EMAIL_SENDER ?? 'noreply@notifications.solidcouch.org '
6061
6162// email verification expiration in seconds (1 hour)
6263export const emailVerificationExpiration = 3600
Original file line number Diff line number Diff line change 11import { DefaultContext , Middleware } from 'koa'
2- import { appName , emailSender } from '../config/index.js'
2+ import { appName , appUrl , emailSender } from '../config/index.js'
33import { sendMail } from '../services/mailerService.js'
44import { generateHtmlMessage } from '../templates/generateMessage.js'
55import { getVerifiedEmails } from './status.js'
@@ -48,6 +48,10 @@ export const notification: Middleware<
4848 html : await generateHtmlMessage ( 'message' , {
4949 ...body ,
5050 title : subject ,
51+ chatLink : new URL (
52+ `messages?with=${ encodeURIComponent ( body . actor . id ) } ` ,
53+ appUrl ,
54+ ) . toString ( ) ,
5155 } ) ,
5256 text : body . object . content ,
5357 } )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const sendMail = async (options: SendMailOptions) => {
1111 {
1212 filename : path . basename ( appLogo ) ,
1313 path : appLogo ,
14- cid : 'applogo@tired.bike ' ,
14+ cid : 'applogo@solidcouch.org ' ,
1515 } ,
1616 ...( options . attachments ?? [ ] ) ,
1717 ] ,
Original file line number Diff line number Diff line change 66 <body >
77 <header ><img
88 alt =' logo of {{ appName }} '
9- src =' cid:applogo@tired.bike '
9+ src =' cid:applogo@solidcouch.org '
1010 height =' 32'
1111 /></header >
1212 {{{ body }}}
Original file line number Diff line number Diff line change 11<p >Hello{{ #if target.name }} {{ /if }} {{ target.name }} !</p >
22<p >
3- <a href ={{ actor.id }} >{{ #if
3+ <a href =' {{ actor.id }} ' >{{ #if
44 actor.name
55 }} {{ actor.name }} {{ else }} Somebody{{ /if }} </a >
66 sent you a message from
1010<blockquote >{{ object.content }} </blockquote >
1111
1212<p >
13- <a
14- href =' https://tired.bike/messages/{{ encodeURIComponent actor.id }} '
15- class =' action-button'
16- >Reply on
17- {{ appName }} </a >
13+ <a href =' {{ chatLink }} ' class =' action-button' >Reply on {{ appName }} </a >
1814</p >
You can’t perform that action at this time.
0 commit comments