a fun bot for the hc slack

feat: use slack date in title

dunkirk.sh bbe2ef7f aa18290a

verified
+2 -2
+2 -2
src/features/takes/services/upload.ts
··· 2 2 import { db } from "../../../libs/db"; 3 3 import { takes as takesTable } from "../../../libs/schema"; 4 4 import { eq, and } from "drizzle-orm"; 5 - import { prettyPrintTime } from "../../../libs/time"; 5 + import { generateSlackDate, prettyPrintTime } from "../../../libs/time"; 6 6 import * as Sentry from "@sentry/bun"; 7 7 8 8 export default async function upload() { ··· 125 125 title_url: `${process.env.API_URL}/api/video/${take.id}`, 126 126 title: { 127 127 type: "plain_text", 128 - text: `takes from ${takeUploadedAt?.toLocaleString("en-CA", { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hour12: false })}`, 128 + text: `take from ${generateSlackDate(takeUploadedAt)}`, 129 129 }, 130 130 thumbnail_url: `https://cachet.dunkirk.sh/users/${payload.user}/r`, 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}*`,