Upgrade to latest openapi codegen

This commit is contained in:
2024-07-03 14:16:11 +02:00
parent 82524bac8c
commit c36b64cff1
43 changed files with 115 additions and 706 deletions

View File

@@ -5,7 +5,7 @@ import { extractDomain } from "./utils";
export async function sendZulipMessage(
stream: string,
topic: string,
message: string
message: string,
) {
console.log("Sendiing zulip message", stream, topic);
try {
@@ -28,14 +28,14 @@ export const ZULIP_MSG_MAX_LENGTH = 10000;
export function getZulipMessage(
transcript: GetTranscript,
topics: GetTranscriptTopic[] | null,
includeTopics: boolean
includeTopics: boolean,
) {
const date = new Date(transcript.created_at);
// Get the timezone offset in minutes and convert it to hours and minutes
const timezoneOffset = -date.getTimezoneOffset();
const offsetHours = String(
Math.floor(Math.abs(timezoneOffset) / 60)
Math.floor(Math.abs(timezoneOffset) / 60),
).padStart(2, "0");
const offsetMinutes = String(Math.abs(timezoneOffset) % 60).padStart(2, "0");
const offsetSign = timezoneOffset >= 0 ? "+" : "-";