Feat: get message by id (#1634)

* feat: get message by id

Add the feature of getting messages by id.
It's loads messages that are not loaded in the Store.Msg, and add them into the Store.Msg.
I don't use the draft because this is already work

* Fix typo

* Fix for test

* Update index.d.ts

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Codeboss <131376628+codebossdev@users.noreply.github.com>
This commit is contained in:
Shir Serlui 2023-08-07 20:10:11 +03:00 • committed by GitHub
commit b4d82d8425
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

3
index.d.ts vendored
View file

@ -60,6 +60,9 @@ declare namespace WAWebJS {
/** Get contact instance by ID */
getContactById(contactId: string): Promise<Contact>
/** Get message by ID */
getMessageById(messageId: string): Promise<Message>
/** Get all current contact instances */
getContacts(): Promise<Contact[]>