Skip to content

Commit

Permalink
feat: Added client.getPlatformFromMessage function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Aug 15, 2022
1 parent 5ecfcb6 commit 756775e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/api/layers/retriever.layer.ts
Expand Up @@ -429,4 +429,23 @@ export class RetrieverLayer extends SenderLayer {
chatId
);
}

/**
* Get the platform message from message ID
*
* The platform can be:
* android
* iphone
* web
* unknown
* @category Chat
* @param chatId chat id: xxxxx@c.us
*/
public async getPlatformFromMessage(msgId: string): Promise<string> {
return await evaluateAndReturn(
this.page,
(msgId: string) => WPP.chat.getPlatformFromMessage(msgId),
msgId
);
}
}

0 comments on commit 756775e

Please sign in to comment.