feat: add In-Reply-To option (#165)

This commit is contained in:
KM Koushik
2025-05-25 20:44:13 +10:00
committed by GitHub
parent ff32ff9302
commit 15e5327024
14 changed files with 754 additions and 592 deletions

View File

@@ -1,6 +1,5 @@
import { createRoute, z } from "@hono/zod-openapi";
import { PublicAPIApp } from "~/server/public-api/hono";
import { getTeamFromToken } from "~/server/public-api/auth";
import { sendEmail } from "~/server/service/email-service";
import { emailSchema } from "../../schemas/email-schema";

View File

@@ -70,7 +70,6 @@ export function getApp() {
let currentRequests: number;
let ttl: number;
let isNewKey = false;
try {
// Increment the key. If the key does not exist, it is created and set to 1.

View File

@@ -29,6 +29,7 @@ export const emailSchema = z
.max(10) // Limit attachments array size if desired
.optional(),
scheduledAt: z.string().datetime({ offset: true }).optional(), // Ensure ISO 8601 format with offset
inReplyToId: z.string().optional().nullable(),
})
.refine(
(data) => !!data.subject || !!data.templateId,