mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-10 08:21:49 +08:00
fix(extensions):Fix extension method calls that weren't passing args hash
This commit is contained in:
parent
ebf9185fb0
commit
f640ef4ee0
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
|
# When subclassing the ComposerExtension, you can add your own custom logic
|
||||||
# to execute before a draft is sent in the @finalizeSessionBeforeSending
|
# to execute before a draft is sent in the @finalizeSessionBeforeSending
|
||||||
# method. Here, we're registering the events before we send the draft.
|
# method. Here, we're registering the events before we send the draft.
|
||||||
@finalizeSessionBeforeSending: (session) ->
|
@finalizeSessionBeforeSending: ({session}) ->
|
||||||
body = session.draft().body
|
body = session.draft().body
|
||||||
participants = session.draft().participants()
|
participants = session.draft().participants()
|
||||||
sender = session.draft().from
|
sender = session.draft().from
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class ComposerExtension extends ContenteditableExtension
|
||||||
session.changes.add(body: clean)
|
session.changes.add(body: clean)
|
||||||
```
|
```
|
||||||
###
|
###
|
||||||
@finalizeSessionBeforeSending: (session) ->
|
@finalizeSessionBeforeSending: ({session}) ->
|
||||||
return Promise.resolve(session)
|
return Promise.resolve(session)
|
||||||
|
|
||||||
module.exports = ComposerExtension
|
module.exports = ComposerExtension
|
||||||
|
|
|
||||||
|
|
@ -532,7 +532,7 @@ class DraftStore
|
||||||
# Give third-party plugins an opportunity to sanitize draft data
|
# Give third-party plugins an opportunity to sanitize draft data
|
||||||
_runExtensionsBeforeSend: (session) =>
|
_runExtensionsBeforeSend: (session) =>
|
||||||
Promise.each @extensions(), (ext) ->
|
Promise.each @extensions(), (ext) ->
|
||||||
ext.finalizeSessionBeforeSending(session)
|
ext.finalizeSessionBeforeSending({session})
|
||||||
.return(session)
|
.return(session)
|
||||||
|
|
||||||
_onRemoveFile: ({file, messageClientId}) =>
|
_onRemoveFile: ({file, messageClientId}) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue