mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-13 21:24:58 +08:00
94badcda15
There could be a few lurking bugs. Please test!
13 lines
456 B
JavaScript
13 lines
456 B
JavaScript
import {ComposerExtension} from 'nylas-exports';
|
|
import SignatureUtils from './signature-utils';
|
|
|
|
export default class SignatureComposerExtension extends ComposerExtension {
|
|
static prepareNewDraft = ({draft})=> {
|
|
const accountId = draft.accountId;
|
|
const signature = NylasEnv.config.get(`nylas.account-${accountId}.signature`);
|
|
if (!signature) {
|
|
return;
|
|
}
|
|
draft.body = SignatureUtils.applySignature(draft.body, signature);
|
|
}
|
|
}
|