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
1 changed files with 38 additions and 1 deletions
|
|
@ -279,6 +279,14 @@ class Chat extends Base {
|
|||
return this.client.addOrRemoveLabels(labelIds, [this.id._serialized]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets instances of all pinned messages in a chat
|
||||
* @returns {Promise<[Message]|[]>}
|
||||
*/
|
||||
async getPinnedMessages() {
|
||||
return this.client.getPinnedMessages(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sync chat history conversation
|
||||
* @return {Promise<boolean>} True if operation completed successfully, false otherwise.
|
||||
|
|
|
|||
Loading…
Reference in a new issue