getCurrentIdentity method now uses also the folder owner to get the right identity for a reply. see #627
This commit is contained in:
parent
5e58dc940f
commit
6ebc50b005
1 changed files with 11 additions and 0 deletions
|
|
@ -94,6 +94,17 @@ export async function getCurrentIdentity(msgHeader, getFull = false) {
|
|||
}
|
||||
}
|
||||
|
||||
// Check the account that the folder of the message belongs to
|
||||
if (msgHeader.folder && msgHeader.folder.accountId) {
|
||||
const account = accounts.find(a => a.id === msgHeader.folder.accountId);
|
||||
if (account && account.identities && account.identities.length > 0) {
|
||||
// Just return the first identity of the account.
|
||||
const identity = account.identities[0];
|
||||
console.log(">>>>>>>>>> got from folder");
|
||||
return getFull ? { id: identity.id, email: identity.email } : identity.id;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback
|
||||
return getFull ? fallbackIdentity : fallbackIdentity?.id || null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue