mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 05:06:53 +08:00
fix(extensions):Fix extension method calls that weren't passing args hash
This commit is contained in:
parent
72ae4228c0
commit
067a12dc17
3 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ class AvailabilityComposerExtension extends ComposerExtension
|
|||
# When subclassing the ComposerExtension, you can add your own custom logic
|
||||
# to execute before a draft is sent in the @finalizeSessionBeforeSending
|
||||
# method. Here, we're registering the events before we send the draft.
|
||||
@finalizeSessionBeforeSending: (session) ->
|
||||
@finalizeSessionBeforeSending: ({session}) ->
|
||||
body = session.draft().body
|
||||
participants = session.draft().participants()
|
||||
sender = session.draft().from
|
||||
|
|
|
@ -112,7 +112,7 @@ class ComposerExtension extends ContenteditableExtension
|
|||
session.changes.add(body: clean)
|
||||
```
|
||||
###
|
||||
@finalizeSessionBeforeSending: (session) ->
|
||||
@finalizeSessionBeforeSending: ({session}) ->
|
||||
return Promise.resolve(session)
|
||||
|
||||
module.exports = ComposerExtension
|
||||
|
|
|
@ -532,7 +532,7 @@ class DraftStore
|
|||
# Give third-party plugins an opportunity to sanitize draft data
|
||||
_runExtensionsBeforeSend: (session) =>
|
||||
Promise.each @extensions(), (ext) ->
|
||||
ext.finalizeSessionBeforeSending(session)
|
||||
ext.finalizeSessionBeforeSending({session})
|
||||
.return(session)
|
||||
|
||||
_onRemoveFile: ({file, messageClientId}) =>
|
||||
|
|
Loading…
Reference in a new issue