mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-03 08:22:02 +02:00
ENiGMA 1/2 WILL USE SPACES FROM THIS POINT ON VS TABS
* Really just to make GitHub formatting happy. Arg.
This commit is contained in:
parent
5ddf04c882
commit
e9787cee3e
135 changed files with 27397 additions and 27397 deletions
|
@ -8,60 +8,60 @@ const _ = require('lodash');
|
|||
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 {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
const self = this;
|
||||
const self = this;
|
||||
|
||||
// we're posting, so always start with 'edit' mode
|
||||
this.editorMode = 'edit';
|
||||
// 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(
|
||||
[
|
||||
function getMessageObject(callback) {
|
||||
self.getMessage(function gotMsg(err, msgObj) {
|
||||
msg = msgObj;
|
||||
return callback(err);
|
||||
});
|
||||
},
|
||||
function saveMessage(callback) {
|
||||
return persistMessage(msg, callback);
|
||||
},
|
||||
function updateStats(callback) {
|
||||
self.updateUserStats(callback);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
if(err) {
|
||||
// :TODO:... sooooo now what?
|
||||
} else {
|
||||
// note: not logging 'from' here as it's part of client.log.xxxx()
|
||||
self.client.log.info(
|
||||
{ to : msg.toUserName, subject : msg.subject, uuid : msg.uuid },
|
||||
'Message persisted'
|
||||
);
|
||||
}
|
||||
var msg;
|
||||
async.series(
|
||||
[
|
||||
function getMessageObject(callback) {
|
||||
self.getMessage(function gotMsg(err, msgObj) {
|
||||
msg = msgObj;
|
||||
return callback(err);
|
||||
});
|
||||
},
|
||||
function saveMessage(callback) {
|
||||
return persistMessage(msg, callback);
|
||||
},
|
||||
function updateStats(callback) {
|
||||
self.updateUserStats(callback);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
if(err) {
|
||||
// :TODO:... sooooo now what?
|
||||
} else {
|
||||
// note: not logging 'from' here as it's part of client.log.xxxx()
|
||||
self.client.log.info(
|
||||
{ to : msg.toUserName, subject : msg.subject, uuid : msg.uuid },
|
||||
'Message persisted'
|
||||
);
|
||||
}
|
||||
|
||||
return self.nextMenu(cb);
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
return self.nextMenu(cb);
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
enter() {
|
||||
if(_.isString(this.client.user.properties.message_area_tag) && !_.isString(this.messageAreaTag)) {
|
||||
this.messageAreaTag = this.client.user.properties.message_area_tag;
|
||||
}
|
||||
enter() {
|
||||
if(_.isString(this.client.user.properties.message_area_tag) && !_.isString(this.messageAreaTag)) {
|
||||
this.messageAreaTag = this.client.user.properties.message_area_tag;
|
||||
}
|
||||
|
||||
super.enter();
|
||||
}
|
||||
super.enter();
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue