messaging-api-messenger
Advanced tools
Comparing version 0.8.2 to 0.8.5
@@ -27,6 +27,6 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; | ||
function validateQuickReplies(quickReplies) { | ||
// quick_replies is limited to 11 | ||
// quick_replies is limited to 13 | ||
(0, _invariant.default)( | ||
Array.isArray(quickReplies) && quickReplies.length <= 11, | ||
'quick_replies is an array and limited to 11'); | ||
Array.isArray(quickReplies) && quickReplies.length <= 13, | ||
'quick_replies is an array and limited to 13'); | ||
@@ -33,0 +33,0 @@ |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.8.2", | ||
"version": "0.8.5", | ||
"main": "lib/index.js", | ||
@@ -38,3 +38,3 @@ "browser": "lib/browser.js", | ||
}, | ||
"gitHead": "c17141765b6417272bfb1a51b19c0b6ae2c7137b" | ||
"gitHead": "44e4ae3a8cc4ce7c1fbb5a482e6e3a3286a227a7" | ||
} |
@@ -351,6 +351,6 @@ import fs from 'fs'; | ||
it('should throw if quick_replies length > 11', async () => { | ||
it('should throw if quick_replies length > 13', async () => { | ||
const { client } = createMock(); | ||
const lotsOfQuickReplies = new Array(12).fill({ | ||
const lotsOfQuickReplies = new Array(14).fill({ | ||
content_type: 'text', | ||
@@ -367,3 +367,3 @@ title: 'Red', | ||
); | ||
}).toThrow('quick_replies is an array and limited to 11'); | ||
}).toThrow('quick_replies is an array and limited to 13'); | ||
}); | ||
@@ -370,0 +370,0 @@ |
@@ -27,6 +27,6 @@ /* @flow */ | ||
function validateQuickReplies(quickReplies: Array<QuickReply>): void { | ||
// quick_replies is limited to 11 | ||
// quick_replies is limited to 13 | ||
invariant( | ||
Array.isArray(quickReplies) && quickReplies.length <= 11, | ||
'quick_replies is an array and limited to 11' | ||
Array.isArray(quickReplies) && quickReplies.length <= 13, | ||
'quick_replies is an array and limited to 13' | ||
); | ||
@@ -33,0 +33,0 @@ |