fix: sync identity stores and append signatures to outgoing emails (#15)
- Add syncIdentities() to auth store to propagate identity changes from identity store, fixing stale data that caused save failures and duplicates - Call syncIdentities() after every create, update, and delete in the identity manager modal - Switch email composer to read identities from identity store for consistency with the rest of the app - Append identity text signature (with RFC 3676 separator) to email body when sending from the composer and quick reply paths - Add tests for syncIdentities and signature appending logic
This commit is contained in:
@@ -761,12 +761,18 @@ export default function Home() {
|
||||
|
||||
const primaryIdentity = identities[0];
|
||||
|
||||
// Append signature from the primary identity
|
||||
let finalBody = body;
|
||||
if (primaryIdentity?.textSignature) {
|
||||
finalBody = body + '\n\n-- \n' + primaryIdentity.textSignature;
|
||||
}
|
||||
|
||||
// Send reply with just the body text
|
||||
await sendEmail(
|
||||
client,
|
||||
[sender.email],
|
||||
`Re: ${selectedEmail.subject || "(no subject)"}`,
|
||||
body,
|
||||
finalBody,
|
||||
undefined,
|
||||
undefined,
|
||||
primaryIdentity?.id,
|
||||
|
||||
Reference in New Issue
Block a user