Skip to content

Commit

Permalink
fix: don't prefill-from-draft when form is notShareable (e.g. tradle.…
Browse files Browse the repository at this point in the history
…Selfie)
  • Loading branch information
mvayngrib committed Feb 28, 2018
1 parent ad98f8c commit b4b4dfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/in-house-bot/plugins/prefill-from-draft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export function createPlugin ({
plugin.willRequestForm = async ({ user, application, formRequest }) => {
if (!(application && application.prefillFromApplication)) return

const model = bot.models[formRequest.form]
if (model && model.notShareable) return

let draft
try {
draft = await bot.getResourceByStub(application.prefillFromApplication)
Expand Down

0 comments on commit b4b4dfa

Please sign in to comment.