Skip to content

Commit 686a71e

Browse files
committed
✨ feat: keepMessage #3256
1 parent d434a2a commit 686a71e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/api/Client.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ declare module WAPI {
274274
const archiveChat: (id: string, archive: boolean) => Promise<boolean>;
275275
const pinChat: (id: string, pin: boolean) => Promise<boolean>;
276276
const pinMessage: (id: string, pin: boolean, pinDuration: string) => Promise<boolean>;
277+
const keepMessage: (id: string, keep: boolean) => Promise<boolean>;
277278
const markAllRead: () => Boolean;
278279
const isConnected: () => Boolean;
279280
const logout: () => Boolean;
@@ -2467,6 +2468,19 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
24672468
) as Promise<boolean>;
24682469
}
24692470

2471+
/**
2472+
* Keep a message inside an ephemeral chat
2473+
*
2474+
* @param id The id of the message
2475+
* @return boolean true: worked
2476+
*/
2477+
public async keepMessage(id: MessageId, keep: boolean) : Promise<boolean>{
2478+
return await this.pup(
2479+
({ id, keep }) => WAPI.keepMessage(id, keep),
2480+
{ id, keep }
2481+
) as Promise<boolean>;
2482+
}
2483+
24702484
/**
24712485
*
24722486
* {@license:insiders@}

0 commit comments

Comments
 (0)