mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-04 19:57:20 +02:00
Add ability to send directly to a NetMail address
This commit is contained in:
parent
9a00b3eb15
commit
84fd0ff6d2
3 changed files with 17 additions and 4 deletions
13
core/fse.js
13
core/fse.js
|
@ -15,6 +15,7 @@ const stringFormat = require('./string_format.js');
|
|||
const MessageAreaConfTempSwitcher = require('./mod_mixins.js').MessageAreaConfTempSwitcher;
|
||||
const { isAnsi, cleanControlCodes, insert } = require('./string_util.js');
|
||||
const Config = require('./config.js').config;
|
||||
const { getAddressedToInfo } = require('./mail_util.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -432,6 +433,18 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
|||
return callback(null);
|
||||
}
|
||||
|
||||
//
|
||||
// Detect if the user is attempting to send to a remote mail type that we support
|
||||
//
|
||||
// :TODO: how to plug in support without tying to various types here? isSupportedExteranlType() or such
|
||||
const addressedToInfo = getAddressedToInfo(self.message.toUserName);
|
||||
if(addressedToInfo.name && Message.AddressFlavor.FTN === addressedToInfo.flavor) {
|
||||
self.message.setRemoteToUser(addressedToInfo.remote);
|
||||
self.message.setExternalFlavor(addressedToInfo.flavor);
|
||||
self.message.toUserName = addressedToInfo.name;
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
// we need to look it up
|
||||
User.getUserIdAndNameByLookup(self.message.toUserName, (err, toUserId) => {
|
||||
if(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue