diff --git a/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.js b/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts similarity index 89% rename from apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.js rename to apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts index 5e9ef35fa9e82..a8ee99f2b15a8 100644 --- a/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.js +++ b/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts @@ -1,10 +1,9 @@ import _ from 'underscore'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; import { DirectReplyIMAPInterceptor, POP3Helper } from '../lib/interceptDirectReplyEmails.js'; let client; - const startEmailIntercepter = _.debounce(async function () { console.log('Email Intercepter...'); const protocol = settings.get('Direct_Reply_Protocol'); @@ -33,6 +32,6 @@ const startEmailIntercepter = _.debounce(async function () { client.start(); }, 1000); -settings.onload(/^Direct_Reply_.+/, startEmailIntercepter); +settings.watchByRegex(/^Direct_Reply_.+/, startEmailIntercepter); startEmailIntercepter();