diff --git a/lib/response.js b/lib/response.js index b342a38..d1b94a2 100644 --- a/lib/response.js +++ b/lib/response.js @@ -46,14 +46,10 @@ Response = (function () { } Response.prototype.job_attach = function (...attachments) { const requiredLabels = [ 'type', 'label', 'value' ] - const allowedTypes = [ 'link', 'password' ] for (const attachment of attachments) { if (!~requiredLabels.every(l => ~Object.keys(attachment).indexOf(l))) { throw new Error(`Attachment requires mandatory properties ${requiredLabels.join(', ')}`) } - if (!~allowedTypes.indexOf(attachment.type)) { - throw new Error(`Attachment must be of one of the following types ${allowedTypes.join(', ')}`) - } } this._attachments.push(...attachments) this.meta('set_job_attachments', JSON.stringify(this._attachments))