diff --git a/app/federation/server/hooks/afterCreateDirectRoom.js b/app/federation/server/hooks/afterCreateDirectRoom.js index b32601b106c4..1c792b280f7d 100644 --- a/app/federation/server/hooks/afterCreateDirectRoom.js +++ b/app/federation/server/hooks/afterCreateDirectRoom.js @@ -60,7 +60,7 @@ async function afterCreateDirectRoom(room, extras) { // Dispatch the events dispatchEvents(normalizedRoom.federation.domains, [genesisEvent, sourceUserEvent, targetUserEvent]); } catch (err) { - Promise.await(deleteRoom(room._id)); + await deleteRoom(room._id); logger.client.error('afterCreateDirectRoom => Could not create federated room:', err); } diff --git a/app/lib/server/methods/saveSetting.js b/app/lib/server/methods/saveSetting.js index 2b6b4cab229f..e388f277d4b2 100644 --- a/app/lib/server/methods/saveSetting.js +++ b/app/lib/server/methods/saveSetting.js @@ -1,10 +1,10 @@ import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; -import { hasPermission, hasAllPermission } from '../../../authorization'; +import { hasPermission, hasAllPermission } from '../../../authorization/server'; +import { getSettingPermissionId } from '../../../authorization/lib'; import { settings } from '../../../settings'; import { Settings } from '../../../models'; -import { getSettingPermissionId } from '../lib'; Meteor.methods({ saveSetting(_id, value, editor) { diff --git a/app/ui-admin/client/admin.js b/app/ui-admin/client/admin.js index 11c4e0e787d5..4a8b06f6a01c 100644 --- a/app/ui-admin/client/admin.js +++ b/app/ui-admin/client/admin.js @@ -51,10 +51,7 @@ const setFieldValue = function(settingId, value, type, editor) { Template.admin.onCreated(function() { if (settings.cachedCollectionPrivate == null) { - settings.cachedCollectionPrivate = new PrivateSettingsCachedCollection({ - name: 'private-settings', - eventType: 'onLogged', - }); + settings.cachedCollectionPrivate = new PrivateSettingsCachedCollection(); settings.collectionPrivate = settings.cachedCollectionPrivate.collection; settings.cachedCollectionPrivate.init(); }