fix(backend): fix notification author url (#8837)

* fix notification author url

* updated snapshots
This commit is contained in:
Ulf Gebhardt 2025-08-22 02:31:56 +01:00 committed by GitHub
parent ea080db3f5
commit 3e58a1016a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`sendNotificationMail English changed_group_member_role template 1`] = `
{
@ -357,7 +357,7 @@ footer {
<h2>Hello Jenny Rostock,</h2>
<div class="wrapper">
<div class="content"></div>
<p><a class="user" href="http://webapp:3000/user/u2/peter-lustig">Peter Lustig</a>, a user you are following, wrote a new post with the title “New Post”. Click on the button to view this post:
<p><a class="user" href="http://webapp:3000/profile/u2/peter-lustig">Peter Lustig</a>, a user you are following, wrote a new post with the title “New Post”. Click on the button to view this post:
</p><a class="button" href="http://webapp:3000/post/p1/new-post">View post</a>
<div class="text-block">
<p>See you soon on <a class="organization" href="https://ocelot.social">ocelot.social</a>!</p>
@ -377,7 +377,7 @@ footer {
"subject": "ocelot.social Notification: New post by followd user",
"text": "HELLO JENNY ROSTOCK,
Peter Lustig [http://webapp:3000/user/u2/peter-lustig], a user you are
Peter Lustig [http://webapp:3000/profile/u2/peter-lustig], a user you are
following, wrote a new post with the title “New Post”. Click on the button to
view this post:
@ -625,7 +625,7 @@ footer {
<h2>Hello Jenny Rostock,</h2>
<div class="wrapper">
<div class="content"></div>
<p><a class="user" href="http://webapp:3000/user/u2/peter-lustig">Peter Lustig</a> mentioned you in a post with the title “New Post”. Click on the button to view this post:
<p><a class="user" href="http://webapp:3000/profile/u2/peter-lustig">Peter Lustig</a> mentioned you in a post with the title “New Post”. Click on the button to view this post:
</p><a class="button" href="http://webapp:3000/post/p1/new-post">View post</a>
<div class="text-block">
<p>See you soon on <a class="organization" href="https://ocelot.social">ocelot.social</a>!</p>
@ -645,8 +645,8 @@ footer {
"subject": "ocelot.social Notification: Mentioned in post",
"text": "HELLO JENNY ROSTOCK,
Peter Lustig [http://webapp:3000/user/u2/peter-lustig] mentioned you in a post
with the title “New Post”. Click on the button to view this post:
Peter Lustig [http://webapp:3000/profile/u2/peter-lustig] mentioned you in a
post with the title “New Post”. Click on the button to view this post:
View post [http://webapp:3000/post/p1/new-post]
@ -1551,7 +1551,7 @@ footer {
<h2>Hallo Jenny Rostock,</h2>
<div class="wrapper">
<div class="content"></div>
<p><a class="user" href="http://webapp:3000/user/u2/peter-lustig">Peter Lustig</a>, ein Nutzer dem du folgst, hat einen neuen Beitrag mit dem Titel „New Post“ geschrieben. Klicke auf den Knopf, um diesen Beitrag zu sehen:
<p><a class="user" href="http://webapp:3000/profile/u2/peter-lustig">Peter Lustig</a>, ein Nutzer dem du folgst, hat einen neuen Beitrag mit dem Titel „New Post“ geschrieben. Klicke auf den Knopf, um diesen Beitrag zu sehen:
</p><a class="button" href="http://webapp:3000/post/p1/new-post">Beitrag ansehen</a>
<div class="text-block">
<p>Bis bald bei <a class="organization" href="https://ocelot.social">ocelot.social</a>!</p>
@ -1571,7 +1571,7 @@ footer {
"subject": "ocelot.social Benachrichtigung: Neuer Beitrag von gefolgtem Nutzer",
"text": "HALLO JENNY ROSTOCK,
Peter Lustig [http://webapp:3000/user/u2/peter-lustig], ein Nutzer dem du
Peter Lustig [http://webapp:3000/profile/u2/peter-lustig], ein Nutzer dem du
folgst, hat einen neuen Beitrag mit dem Titel „New Post“ geschrieben. Klicke auf
den Knopf, um diesen Beitrag zu sehen:
@ -1819,7 +1819,7 @@ footer {
<h2>Hallo Jenny Rostock,</h2>
<div class="wrapper">
<div class="content"></div>
<p><a class="user" href="http://webapp:3000/user/u2/peter-lustig">Peter Lustig</a> hat dich in einem Beitrag mit dem Titel „New Post“ erwähnt. Klicke auf den Knopf, um den Beitrag zu sehen:
<p><a class="user" href="http://webapp:3000/profile/u2/peter-lustig">Peter Lustig</a> hat dich in einem Beitrag mit dem Titel „New Post“ erwähnt. Klicke auf den Knopf, um den Beitrag zu sehen:
</p><a class="button" href="http://webapp:3000/post/p1/new-post">Beitrag ansehen</a>
<div class="text-block">
<p>Bis bald bei <a class="organization" href="https://ocelot.social">ocelot.social</a>!</p>
@ -1839,8 +1839,9 @@ footer {
"subject": "ocelot.social Benachrichtigung: Erwähnung in Beitrag",
"text": "HALLO JENNY ROSTOCK,
Peter Lustig [http://webapp:3000/user/u2/peter-lustig] hat dich in einem Beitrag
mit dem Titel „New Post“ erwähnt. Klicke auf den Knopf, um den Beitrag zu sehen:
Peter Lustig [http://webapp:3000/profile/u2/peter-lustig] hat dich in einem
Beitrag mit dem Titel „New Post“ erwähnt. Klicke auf den Knopf, um den Beitrag
zu sehen:
Beitrag ansehen [http://webapp:3000/post/p1/new-post]

View File

@ -106,7 +106,7 @@ export const sendNotificationMail = async (notification: any): Promise<OriginalM
notification?.from?.__typename === 'Comment'
? undefined
: new URL(
`user/${notification?.from?.author?.id}/${notification?.from?.author?.slug}`,
`profile/${notification?.from?.author?.id}/${notification?.from?.author?.slug}`,
CONFIG.CLIENT_URI,
),
commenterName: