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:
Linus Rath
2026-03-15 16:07:45 +01:00
parent 5643170220
commit 0080d27b3e
6 changed files with 214 additions and 3 deletions
+7 -1
View File
@@ -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,