fix(extensions):Fix extension method calls that weren't passing args hash

This commit is contained in:
Juan Tejada 2015-12-30 19:05:27 -05:00
parent 72ae4228c0
commit 067a12dc17
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -112,7 +112,7 @@ class ComposerExtension extends ContenteditableExtension
session.changes.add(body: clean)
```
###
@finalizeSessionBeforeSending: (session) ->
@finalizeSessionBeforeSending: ({session}) ->
return Promise.resolve(session)
module.exports = ComposerExtension

View file

@ -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}) =>