move notification config to new file
This commit is contained in:
parent
38bdafdf13
commit
7eebae30f9
|
@ -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"
|
||||
});
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue