From 20d3b0fec9f0b58bf62d6c9323f4abc2c59daef5 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 17 Jun 2019 21:08:50 -0600 Subject: [PATCH] Doh, fix username vs realname --- README.md | 1 + core/fse.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b72d42cb..92c9a940 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ ENiGMA½ is a modern BBS software with a nostalgic flair! * Renegade style [pipe color codes](/docs/configuration/colour-codes.md). * [SQLite](http://sqlite.org/) storage of users, message areas, etc. * Strong [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) backed password encryption. + * Support for 2-Factor Authentication with One-Time-Passwords * [Door support](docs/modding/door-servers.md) including common dropfile formats for legacy DOS doors. Built in [BBSLink](http://bbslink.net/), [DoorParty](http://forums.throwbackbbs.com/), [Exodus](https://oddnetwork.org/exodus/) and [CombatNet](http://combatnet.us/) support! * [Bunyan](https://github.com/trentm/node-bunyan) logging! * [Message networks](docs/messageareas/message-networks.md) with FidoNet Type Network (FTN) + BinkleyTerm Style Outbound (BSO) message import/export. Messages Bases can also be exposed via [Gopher](docs/servers/gopher.md), or [NNTP](docs/servers/nntp.md)! diff --git a/core/fse.js b/core/fse.js index d86961b2..890fb009 100644 --- a/core/fse.js +++ b/core/fse.js @@ -326,10 +326,17 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul buildMessage(cb) { const headerValues = this.viewControllers.header.getFormData().value; + const getFromUserName = () => { + const area = getMessageAreaByTag(this.messageAreaTag); + return (area && area.realNames) ? + this.client.user.getProperty(UserProps.RealName) || this.client.user.username : + this.client.user.username; + }; + const msgOpts = { areaTag : this.messageAreaTag, toUserName : headerValues.to, - fromUserName : this.client.user.getProperty(UserProps.RealName) || this.client.user.username, + fromUserName : getFromUserName(), subject : headerValues.subject, // :TODO: don't hard code 1 here: message : this.viewControllers.body.getView(MciViewIds.body.message).getData( { forceLineTerms : this.replyIsAnsi } ),