feat: get pinned messages (#3004)
* feat: add getPinnedMessage method * docs: add docs for the method * chore: fix eslint * refactor: change logic of getting pinned messages * refactor: combine all PinnedMsgUtils * chore: remove comments and mark as ready for review * style: fix typo Co-authored-by: crazynds <36674096+crazynds@users.noreply.github.com> --------- Co-authored-by: crazynds <36674096+crazynds@users.noreply.github.com>
This commit is contained in:
parent
44418e66c2
commit
18b1d32825
4 changed files with 38 additions and 1 deletions
7
index.d.ts
vendored
7
index.d.ts
vendored
|
|
@ -99,6 +99,9 @@ declare namespace WAWebJS {
|
|||
/** Get message by ID */
|
||||
getMessageById(messageId: string): Promise<Message>
|
||||
|
||||
/** Gets instances of all pinned messages in a chat */
|
||||
getPinnedMessages(chatId: string): Promise<[Message]|[]>
|
||||
|
||||
/** Get all current contact instances */
|
||||
getContacts(): Promise<Contact[]>
|
||||
|
||||
|
|
@ -370,7 +373,7 @@ declare namespace WAWebJS {
|
|||
ack: MessageAck
|
||||
) => void): this
|
||||
|
||||
/** Emitted when an ack event occurrs on message type */
|
||||
/** Emitted when an edit event occurrs on message type */
|
||||
on(event: 'message_edit', listener: (
|
||||
/** The message that was affected */
|
||||
message: Message,
|
||||
|
|
@ -1601,6 +1604,8 @@ declare namespace WAWebJS {
|
|||
getLabels: () => Promise<Label[]>,
|
||||
/** Add or remove labels to this Chat */
|
||||
changeLabels: (labelIds: Array<string | number>) => Promise<void>
|
||||
/** Gets instances of all pinned messages in a chat */
|
||||
getPinnedMessages: () => Promise<[Message]|[]>
|
||||
/** Sync history conversation of the Chat */
|
||||
syncHistory: () => Promise<boolean>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue