Doh, fix username vs realname

This commit is contained in:
Bryan Ashby 2019-06-17 21:08:50 -06:00
parent cc3f79a276
commit 20d3b0fec9
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
2 changed files with 9 additions and 1 deletions

View File

@ -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)!

View File

@ -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 } ),