Skip to content

Instantly share code, notes, and snippets.

@mrmch
Created June 13, 2014 21:22
Show Gist options
  • Save mrmch/6400f9c926bed147560a to your computer and use it in GitHub Desktop.
Save mrmch/6400f9c926bed147560a to your computer and use it in GitHub Desktop.
notifyWatcherOfChange: (editor, watcher, changedDocument, editPath) ->
context =
email_id: sendwithus_email_templates.change_made_notify_watcher
recipient:
address: watcher.get('email')
name: watcher.get('name')
email_data:
doc_name: changedDocument.get('name') or '???'
submitter_name: editor.get('name') or '???'
doc_link: if editPath then "http://codecombat.com#{editPath}" else null
commit_message: changedDocument.get('commitMessage')
sendwithus_api.send context, (err, result) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment