mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 01:04:39 +08:00
579d4ad71b
Summary: - Fixes #1239 - Adds action in composer view to indicate when draft partcipants have changed. This seemed like the simplest way to listen for this change without adding another extension point - Updates signature plugin to listen to this action and update signature accordingly - Adds test Test Plan: - Unit tests Reviewers: evan, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2614
12 lines
450 B
CoffeeScript
12 lines
450 B
CoffeeScript
{ComposerExtension, AccountStore} = require 'nylas-exports'
|
|
SignatureUtils = require './signature-utils'
|
|
|
|
class SignatureComposerExtension extends ComposerExtension
|
|
@prepareNewDraft: ({draft}) ->
|
|
accountId = draft.accountId
|
|
signature = NylasEnv.config.get("nylas.account-#{accountId}.signature")
|
|
return unless signature
|
|
|
|
draft.body = SignatureUtils.applySignature(draft.body, signature)
|
|
|
|
module.exports = SignatureComposerExtension
|