mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 04:04:50 +08:00
On reply, set from
field to the received email to
field #1805
This commit is contained in:
parent
f0b3d798bc
commit
534b71e5a4
2 changed files with 11 additions and 4 deletions
|
@ -3,10 +3,6 @@ import { EmailModel } from 'Model/Email';
|
|||
import { addObservablesTo, addComputablesTo } from 'External/ko';
|
||||
|
||||
export class IdentityModel extends EmailModel /*AbstractModel*/ {
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} email
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import Remote from 'Remote/User/Fetch';
|
|||
|
||||
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
|
||||
import { EmailModel } from 'Model/Email';
|
||||
import { IdentityModel } from 'Model/Identity';
|
||||
import { MimeHeaderAutocryptModel } from 'Model/MimeHeaderAutocrypt';
|
||||
import { addressparser } from 'Mime/Address';
|
||||
|
||||
|
@ -871,6 +872,16 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
// case ComposeType.Empty:
|
||||
}
|
||||
}
|
||||
// Set from custom email
|
||||
if (!identity
|
||||
&& oLastMessage && (ComposeType.Reply === options.mode || ComposeType.ReplyAll === options.mode)
|
||||
&& 1 === oLastMessage.to.length
|
||||
// && mEmail.includes(oLastMessage.to[0].domain)
|
||||
) {
|
||||
identity = new IdentityModel;
|
||||
identity.name = oLastMessage.to[0].name;
|
||||
identity.email = oLastMessage.to[0].email;
|
||||
}
|
||||
identity = identity || IdentityUserStore()[0];
|
||||
if (identity) {
|
||||
// excludeEmail.add(identity.email);
|
||||
|
|
Loading…
Reference in a new issue