move notification config to new file

This commit is contained in:
Hri7566 2024-10-23 02:31:32 -04:00
parent 38bdafdf13
commit 7eebae30f9
2 changed files with 14 additions and 12 deletions

View File

@ -0,0 +1,13 @@
import { ConfigManager } from "./config";
export const notificationConfig = ConfigManager.loadConfig<{
allowXSS: boolean;
maxDuration: number;
defaultDuration: number;
allTarget: string;
}>("config/notifications.yml", {
allowXSS: true,
maxDuration: 60000,
defaultDuration: 7000,
allTarget: "all"
});

View File

@ -1,20 +1,9 @@
import { notificationConfig as config } from "~/util/notificationConfig";
import { ChannelList } from "../../../../channel/ChannelList";
import { ConfigManager } from "../../../../util/config";
import { ServerEventListener } from "../../../../util/types";
import { socketsByUUID } from "../../../Socket";
const config = ConfigManager.loadConfig<{
allowXSS: boolean;
maxDuration: number;
defaultDuration: number;
allTarget: string;
}>("config/notifications.yml", {
allowXSS: true,
maxDuration: 60000,
defaultDuration: 7000,
allTarget: "all"
});
export const notification: ServerEventListener<"notification"> = {
id: "notification",
callback: async (msg, socket) => {