From 2b1c90ef775e9f346360562c05b84b44f328a4b2 Mon Sep 17 00:00:00 2001 From: mrkvon Date: Fri, 19 Dec 2025 16:19:03 +0100 Subject: [PATCH 1/2] fix: point reply link to current app route additionally change default branding to SolidCouch (including license) --- .env.sample | 8 ++++---- LICENSE | 2 +- logo.png | Bin 5198 -> 2799 bytes src/config/index.ts | 11 ++++++----- src/controllers/notification.ts | 6 +++++- src/services/mailerService.ts | 2 +- src/templates/layout.hbs | 4 ++-- src/templates/message.hbs | 10 +++------- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.env.sample b/.env.sample index 41a41e2..27f082a 100644 --- a/.env.sample +++ b/.env.sample @@ -2,12 +2,12 @@ PORT=3005 # name of the app that sends the emails - featured in the message subject or body -APP_NAME=Tired.bike -APP_URL=https://tired.bike +APP_NAME=SolidCouch +APP_URL=https://app.solidcouch.org # provide path to a logo to display on top of emails - keep it small! # absolute path, or relative path to the base of the project APP_LOGO=./logo.png -SUPPORT_EMAIL=support@tired.bike +SUPPORT_EMAIL=support@solidcouch.org # server base url, e.g. to construct correct email verification link # this is the base url that end users see @@ -42,7 +42,7 @@ SMTP_TRANSPORT_AUTH_PASS= SMTP_TRANSPORT_REQUIRE_TLS= # email address which will be the sender of the notifications and email verification messages -EMAIL_SENDER=noreply@notifications.tired.bike +EMAIL_SENDER=noreply@notifications.solidcouch.org # JWT # path to JWT (private) key diff --git a/LICENSE b/LICENSE index c5ba3d9..727c733 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Tired Bike +Copyright (c) 2023 SolidCouch contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/logo.png b/logo.png index d054466050da9325ed11edceeaaa989b417152cf..260b364a4fb4758ba09645c10d03f1cd6776c8fa 100644 GIT binary patch literal 2799 zcmV)P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H13VcaK zK~#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{N8IZ9r)6`rwqJ!6u{d%=u+eqG^&RsTn1jP{G_L$&`=?yy zwnnu-Ps`kLtclqm+pmwSoE)Q{(zLqCb#cvwMH}xeG;T43!Sl;PvTlZMJ#^dN+o&l` zv#T;UeK4;%ziRm&j|(p=B9;|jEc~je{{D7trc&Js-%r=8bE*byZL^)fIFjB9{%|9a N!~tQ#D!=%3{{f%Ne%t^6 diff --git a/src/config/index.ts b/src/config/index.ts index 5c7b5e4..c51fa81 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -14,14 +14,15 @@ export const baseUrl = ? `http://localhost:${port}` : process.env.BASE_URL -export const appName = process.env.APP_NAME ?? 'Tired.bike' +export const appName = process.env.APP_NAME ?? 'SolidCouch' -export const appUrl = process.env.APP_URL ?? 'https://tired.bike' +export const appUrl = process.env.APP_URL ?? 'https://app.solidcouch.org' -// default is tired.bike logo +// default is SolidCouch logo export const appLogo = process.env.APP_LOGO ?? './logo.png' -export const supportEmail = process.env.SUPPORT_EMAIL ?? 'support@tired.bike' +export const supportEmail = + process.env.SUPPORT_EMAIL ?? 'support@solidcouch.org' // identity under which the mailer is operating export const mailerCredentials = { @@ -56,7 +57,7 @@ export const smtpTransportOptions: SMTPTransport.Options = { // email address which will be the sender of the notifications and email verification messages export const emailSender = - process.env.EMAIL_SENDER ?? 'noreply@notifications.tired.bike' + process.env.EMAIL_SENDER ?? 'noreply@notifications.solidcouch.org' // email verification expiration in seconds (1 hour) export const emailVerificationExpiration = 3600 diff --git a/src/controllers/notification.ts b/src/controllers/notification.ts index 00b777e..70cbcb0 100644 --- a/src/controllers/notification.ts +++ b/src/controllers/notification.ts @@ -1,5 +1,5 @@ import { DefaultContext, Middleware } from 'koa' -import { appName, emailSender } from '../config/index.js' +import { appName, appUrl, emailSender } from '../config/index.js' import { sendMail } from '../services/mailerService.js' import { generateHtmlMessage } from '../templates/generateMessage.js' import { getVerifiedEmails } from './status.js' @@ -48,6 +48,10 @@ export const notification: Middleware< html: await generateHtmlMessage('message', { ...body, title: subject, + chatLink: new URL( + `messages?with=${encodeURIComponent(body.actor.id)}`, + appUrl, + ).toString(), }), text: body.object.content, }) diff --git a/src/services/mailerService.ts b/src/services/mailerService.ts index f623a3d..3b46b65 100644 --- a/src/services/mailerService.ts +++ b/src/services/mailerService.ts @@ -11,7 +11,7 @@ export const sendMail = async (options: SendMailOptions) => { { filename: path.basename(appLogo), path: appLogo, - cid: 'applogo@tired.bike', + cid: 'applogo@solidcouch.org', }, ...(options.attachments ?? []), ], diff --git a/src/templates/layout.hbs b/src/templates/layout.hbs index 38b5160..7964178 100644 --- a/src/templates/layout.hbs +++ b/src/templates/layout.hbs @@ -6,7 +6,7 @@
logo of {{appName}}
{{{body}}} @@ -15,4 +15,4 @@ {{supportEmail}}

- \ No newline at end of file + diff --git a/src/templates/message.hbs b/src/templates/message.hbs index 0f21484..8f60a02 100644 --- a/src/templates/message.hbs +++ b/src/templates/message.hbs @@ -1,6 +1,6 @@

Hello{{#if target.name}} {{/if}}{{target.name}}!

- {{#if + {{#if actor.name }}{{actor.name}}{{else}}Somebody{{/if}} sent you a message from @@ -10,9 +10,5 @@

{{object.content}}

- Reply on - {{appName}} -

\ No newline at end of file + Reply on {{appName}} +

From 9c7df71818fa95e353d48414c16c2ecd1e38cd5e Mon Sep 17 00:00:00 2001 From: mrkvon Date: Fri, 19 Dec 2025 16:55:38 +0100 Subject: [PATCH 2/2] fix prettier issue --- src/templates/layout.hbs | 2 +- src/templates/message.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/layout.hbs b/src/templates/layout.hbs index 7964178..5cc6ba6 100644 --- a/src/templates/layout.hbs +++ b/src/templates/layout.hbs @@ -15,4 +15,4 @@ {{supportEmail}}

- + \ No newline at end of file diff --git a/src/templates/message.hbs b/src/templates/message.hbs index 8f60a02..e7e3733 100644 --- a/src/templates/message.hbs +++ b/src/templates/message.hbs @@ -11,4 +11,4 @@

Reply on {{appName}} -

+

\ No newline at end of file