This repository was archived by the owner on Nov 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ import { EmailModel } from 'Model/Email';
33import { addObservablesTo , addComputablesTo } from 'External/ko' ;
44
55export class IdentityModel extends EmailModel /*AbstractModel*/ {
6- /**
7- * @param {string } id
8- * @param {string } email
9- */
106 constructor ( ) {
117 super ( ) ;
128
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import Remote from 'Remote/User/Fetch';
4444
4545import { ComposeAttachmentModel } from 'Model/ComposeAttachment' ;
4646import { EmailModel } from 'Model/Email' ;
47+ import { IdentityModel } from 'Model/Identity' ;
4748import { MimeHeaderAutocryptModel } from 'Model/MimeHeaderAutocrypt' ;
4849import { addressparser } from 'Mime/Address' ;
4950
@@ -871,6 +872,16 @@ export class ComposePopupView extends AbstractViewPopup {
871872// case ComposeType.Empty:
872873 }
873874 }
875+ // Set from custom email
876+ if ( ! identity
877+ && oLastMessage && ( ComposeType . Reply === options . mode || ComposeType . ReplyAll === options . mode )
878+ && 1 === oLastMessage . to . length
879+ // && mEmail.includes(oLastMessage.to[0].domain)
880+ ) {
881+ identity = new IdentityModel ;
882+ identity . name = oLastMessage . to [ 0 ] . name ;
883+ identity . email = oLastMessage . to [ 0 ] . email ;
884+ }
874885 identity = identity || IdentityUserStore ( ) [ 0 ] ;
875886 if ( identity ) {
876887// excludeEmail.add(identity.email);
You can’t perform that action at this time.
0 commit comments