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

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