You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: types/text.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/**
2
2
* Text API object
3
3
*
4
-
* @property {String} body Body of the message. Maximum length: 1024 characters.
4
+
* @property {String} body Body of the message. Maximum length: 4096 characters.
5
5
* @property {Boolean} preview_url Whether to enable preview for the text message
6
6
* @property {String} _ The type of the object, for internal use only
7
7
*/
@@ -12,11 +12,11 @@
12
12
* @param {String} body The text of the text message which can contain formatting and URLs which begin with http:// or https://
13
13
* @param {Boolean} preview_url By default, WhatsApp recognizes URLs and makes them clickable, but you can also include a preview box with more information about the link. Set this field to true if you want to include a URL preview box. Defaults to false.
14
14
* @throws {Error} If body is not provided
15
-
* @throws {Error} If body is over 1024 characters
15
+
* @throws {Error} If body is over 4096 characters
16
16
*/
17
17
constructor(body,preview_url=false){
18
18
if(!body)thrownewError("Text must have a body object");
19
-
if(body.length>1024)thrownewError("Text body must be less than 1024 characters");
19
+
if(body.length>4096)thrownewError("Text body must be less than 4096 characters");
0 commit comments