feat: Adding file size by bytes to MessageMedia (#1273)

* Update index.d.ts

* Update Message.js

* Update Message.js

* Update MessageMedia.js

* Update MessageMedia.js
This commit is contained in:
Rajeh Taher 2022-08-09 18:29:59 +03:00 • committed by GitHub
commit bd553f75d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 8 deletions

5
index.d.ts vendored
View file

@ -809,13 +809,16 @@ declare namespace WAWebJS {
data: string
/** Document file name. Value can be null */
filename?: string | null
/** Document file size in bytes. Value can be null. */
filesize?: number | null
/**
* @param {string} mimetype MIME type of the attachment
* @param {string} data Base64-encoded data of the file
* @param {?string} filename Document file name. Value can be null
* @param {?number} filesize Document file size in bytes. Value can be null.
*/
constructor(mimetype: string, data: string, filename?: string | null)
constructor(mimetype: string, data: string, filename?: string | null, filesize?: number | null)
/** Creates a MessageMedia instance from a local file path */
static fromFilePath: (filePath: string) => MessageMedia