Skip to content

Commit

Permalink
fix lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Sep 12, 2019
1 parent 18488e8 commit 8c19a5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/federation/server/hooks/afterCreateDirectRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions app/lib/server/methods/saveSetting.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
5 changes: 1 addition & 4 deletions app/ui-admin/client/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 8c19a5b

Please sign in to comment.