mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03: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';
|
import { addObservablesTo, addComputablesTo } from 'External/ko';
|
||||||
|
|
||||||
export class IdentityModel extends EmailModel /*AbstractModel*/ {
|
export class IdentityModel extends EmailModel /*AbstractModel*/ {
|
||||||
/**
|
|
||||||
* @param {string} id
|
|
||||||
* @param {string} email
|
|
||||||
*/
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ import Remote from 'Remote/User/Fetch';
|
||||||
|
|
||||||
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
|
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
|
||||||
import { EmailModel } from 'Model/Email';
|
import { EmailModel } from 'Model/Email';
|
||||||
|
import { IdentityModel } from 'Model/Identity';
|
||||||
import { MimeHeaderAutocryptModel } from 'Model/MimeHeaderAutocrypt';
|
import { MimeHeaderAutocryptModel } from 'Model/MimeHeaderAutocrypt';
|
||||||
import { addressparser } from 'Mime/Address';
|
import { addressparser } from 'Mime/Address';
|
||||||
|
|
||||||
|
|
@ -871,6 +872,16 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
// case ComposeType.Empty:
|
// 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];
|
identity = identity || IdentityUserStore()[0];
|
||||||
if (identity) {
|
if (identity) {
|
||||||
// excludeEmail.add(identity.email);
|
// excludeEmail.add(identity.email);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue