tangled
alpha
login
or
join now
dunkirk.sh
/
smokie
1
fork
atom
a fun bot for the hc slack
1
fork
atom
overview
issues
pulls
pipelines
feat: add pretty take video title
dunkirk.sh
11 months ago
aa18290a
381ee8a0
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+3
-3
1 changed file
expand all
collapse all
unified
split
src
features
takes
services
upload.ts
+3
-3
src/features/takes/services/upload.ts
···
125
125
title_url: `${process.env.API_URL}/api/video/${take.id}`,
126
126
title: {
127
127
type: "plain_text",
128
128
-
text: `takes from ${takeUploadedAt?.toISOString()}`,
128
128
+
text: `takes from ${takeUploadedAt?.toLocaleString("en-CA", { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hour12: false })}`,
129
129
},
130
130
thumbnail_url: `https://cachet.dunkirk.sh/users/${payload.user}/r`,
131
131
-
alt_text: `takes from ${takeUploadedAt?.toISOString()}`,
131
131
+
alt_text: `takes from ${takeUploadedAt?.toLocaleString("en-CA", { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hour12: false })} uploaded with the description: *${take.description}*`,
132
132
},
133
133
{
134
134
type: "divider",
···
275
275
await slackClient.chat.postMessage({
276
276
channel: payload.user.id,
277
277
thread_ts: take[0]?.ts as string,
278
278
-
text: `take approved with multiplier \`${multiplier}\` so you have earned *${Number((takeToApprove.elapsedTimeMs * Number(multiplier)) / 60).toFixed(1)} takes*!`,
278
278
+
text: `take approved with multiplier \`${multiplier}\` so you have earned *${Number((takeToApprove.elapsedTimeMs * Number(multiplier)) / 1000 / 60).toFixed(1)} takes*!`,
279
279
});
280
280
281
281
// delete the message from the review channel