Initial sync up with master after Prettier
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
const FullScreenEditorModule = require('./fse.js').FullScreenEditorModule;
|
||||
const persistMessage = require('./message_area.js').persistMessage;
|
||||
const UserProps = require('./user_property.js');
|
||||
const {
|
||||
hasMessageConfAndAreaWrite,
|
||||
} = require('./message_area.js');
|
||||
const FullScreenEditorModule = require('./fse.js').FullScreenEditorModule;
|
||||
const persistMessage = require('./message_area.js').persistMessage;
|
||||
const UserProps = require('./user_property.js');
|
||||
const { hasMessageConfAndAreaWrite } = require('./message_area.js');
|
||||
|
||||
const async = require('async');
|
||||
const async = require('async');
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'Message Area Post',
|
||||
desc : 'Module for posting a new message to an area',
|
||||
author : 'NuSkooler',
|
||||
name: 'Message Area Post',
|
||||
desc: 'Module for posting a new message to an area',
|
||||
author: 'NuSkooler',
|
||||
};
|
||||
|
||||
exports.getModule = class AreaPostFSEModule extends FullScreenEditorModule {
|
||||
@@ -25,8 +23,7 @@ exports.getModule = class AreaPostFSEModule extends FullScreenEditorModule {
|
||||
// we're posting, so always start with 'edit' mode
|
||||
this.editorMode = 'edit';
|
||||
|
||||
this.menuMethods.editModeMenuSave = function(formData, extraArgs, cb) {
|
||||
|
||||
this.menuMethods.editModeMenuSave = function (formData, extraArgs, cb) {
|
||||
var msg;
|
||||
async.series(
|
||||
[
|
||||
@@ -41,10 +38,10 @@ exports.getModule = class AreaPostFSEModule extends FullScreenEditorModule {
|
||||
},
|
||||
function updateStats(callback) {
|
||||
self.updateUserAndSystemStats(callback);
|
||||
}
|
||||
},
|
||||
],
|
||||
function complete(err) {
|
||||
if(err) {
|
||||
if (err) {
|
||||
// :TODO:... sooooo now what?
|
||||
} else {
|
||||
// note: not logging 'from' here as it's part of client.log.xxxx()
|
||||
@@ -62,14 +59,13 @@ exports.getModule = class AreaPostFSEModule extends FullScreenEditorModule {
|
||||
|
||||
enter() {
|
||||
this.messageAreaTag =
|
||||
this.messageAreaTag ||
|
||||
this.client.user.getProperty(UserProps.MessageAreaTag);
|
||||
this.messageAreaTag || this.client.user.getProperty(UserProps.MessageAreaTag);
|
||||
|
||||
super.enter();
|
||||
}
|
||||
|
||||
initSequence() {
|
||||
if(!hasMessageConfAndAreaWrite(this.client, this.messageAreaTag)) {
|
||||
if (!hasMessageConfAndAreaWrite(this.client, this.messageAreaTag)) {
|
||||
const noAcsMenu =
|
||||
this.menuConfig.config.messageBasePostMessageNoAccess ||
|
||||
'messageBasePostMessageNoAccess';
|
||||
@@ -82,4 +78,4 @@ exports.getModule = class AreaPostFSEModule extends FullScreenEditorModule {
|
||||
|
||||
super.initSequence();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user