tangled
alpha
login
or
join now
frontpage.fyi
/
frontpage
22
fork
atom
AT-based link agregator. Mirror of https://github.com/likeandscribe/frontpage
22
fork
atom
overview
issues
pulls
pipelines
Better comment alert
tom.sherman.is
3 months ago
5ebd8133
52e8a29b
verified
This commit was signed with the committer's
known signature
.
tom.sherman.is
SSH Key Fingerprint:
SHA256:s683B2DU0yXjYHmKfzMF5t1GryE92wn75ZgRoLJ76HY=
+10
-9
1 changed file
expand all
collapse all
unified
split
packages
frontpage
app
api
receive_hook
handlers.ts
+10
-9
packages/frontpage/app/api/receive_hook/handlers.ts
···
254
254
}
255
255
256
256
const bskyProfile = await getBlueskyProfile(repo);
257
257
+
const postUrl = `https://frontpage.fyi/post/${comment.postUri.host}/${comment.postUri.rkey}`;
257
258
await sendDiscordMessage({
258
259
embeds: [
259
260
{
260
261
title: `New ${comment.$type} on Frontpage`,
261
262
description: comment.content,
262
262
-
url: `https://frontpage.fyi/post/${repo}/${rkey}`,
263
263
+
url: `${postUrl}/${repo}/${rkey}`,
263
264
color: 10181046,
264
265
author: bskyProfile
265
266
? {
···
268
269
url: `https://frontpage.fyi/profile/${bskyProfile.handle}`,
269
270
}
270
271
: undefined,
271
271
-
fields: [
272
272
-
{
273
273
-
name: "Context",
274
274
-
value: comment.parentUri
275
275
-
? `https://frontpage.fyi/post/${comment.postUri.host}/${comment.postUri.rkey}/${comment.parentUri.host}/${comment.parentUri.rkey}`
276
276
-
: `https://frontpage.fyi/post/${comment.postUri.host}/${comment.postUri.rkey}`,
277
277
-
},
278
278
-
],
272
272
+
fields: comment.parentUri
273
273
+
? [
274
274
+
{
275
275
+
name: "Context",
276
276
+
value: `${postUrl}/${comment.parentUri.host}/${comment.parentUri.rkey}`,
277
277
+
},
278
278
+
]
279
279
+
: [],
279
280
},
280
281
],
281
282
});