mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-02-14 07:21:23 -05:00
10 lines
352 B
TypeScript
10 lines
352 B
TypeScript
import type { NotificationConfig } from "~/schemas/notifications";
|
|
|
|
export const buildTelegramShoutrrrUrl = (config: Extract<NotificationConfig, { type: "telegram" }>) => {
|
|
let shoutrrrUrl = `telegram://${config.botToken}@telegram?channels=${config.chatId}`;
|
|
if (config.threadId) {
|
|
shoutrrrUrl += `:${config.threadId}`;
|
|
}
|
|
return shoutrrrUrl;
|
|
};
|