Sync history conversation of the Chat (#3281)
* Sync historical message * Add documentation * Code simplify * feat: add syncHistory method in Chat class * docs: update docs * chore: update examples * fix: handle asynchronous function properly * refactor: include await --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
e7265a34b9
commit
0fa6ebb66d
5 changed files with 42 additions and 3 deletions
7
index.d.ts
vendored
7
index.d.ts
vendored
|
|
@ -183,7 +183,10 @@ declare namespace WAWebJS {
|
|||
* So for a non-enterprise user with one WaWeb connection it should return "2"
|
||||
* @param {string} contactId
|
||||
*/
|
||||
getContactDeviceCount(contactId: string): Promise<Number>
|
||||
getContactDeviceCount(contactId: string): Promise<Number>
|
||||
|
||||
/** Sync history conversation of the Chat */
|
||||
syncHistory(chatId: string): Promise<boolean>
|
||||
|
||||
/** Changes and returns the archive state of the Chat */
|
||||
unarchiveChat(chatId: string): Promise<boolean>
|
||||
|
|
@ -1440,6 +1443,8 @@ declare namespace WAWebJS {
|
|||
getLabels: () => Promise<Label[]>,
|
||||
/** Add or remove labels to this Chat */
|
||||
changeLabels: (labelIds: Array<string | number>) => Promise<void>
|
||||
/** Sync history conversation of the Chat */
|
||||
syncHistory: () => Promise<boolean>
|
||||
}
|
||||
|
||||
export interface MessageSearchOptions {
|
||||
|
|
|
|||
Loading…
Reference in a new issue