fix: Chat.isMuted (#2999)
* fix: isMuted returns true or false * docs: add missing parts * refactor: apply simplification * fix: update chat instance after calling mute/unmute * stylee: clarify and fix docs * fix: fix convertation of Date to timestamp * refactor: small code refactor
This commit is contained in:
parent
d29eaf7def
commit
91217f87ba
4 changed files with 41 additions and 20 deletions
10
index.d.ts
vendored
10
index.d.ts
vendored
|
|
@ -116,7 +116,7 @@ declare namespace WAWebJS {
|
|||
* @param chatId ID of the chat that will be muted
|
||||
* @param unmuteDate Date when the chat will be unmuted, leave as is to mute forever
|
||||
*/
|
||||
muteChat(chatId: string, unmuteDate?: Date): Promise<void>
|
||||
muteChat(chatId: string, unmuteDate?: Date): Promise<{ isMuted: boolean, muteExpiration: number }>
|
||||
|
||||
/**
|
||||
* Request authentication via pairing code instead of QR code
|
||||
|
|
@ -208,7 +208,7 @@ declare namespace WAWebJS {
|
|||
unarchiveChat(chatId: string): Promise<boolean>
|
||||
|
||||
/** Unmutes the Chat */
|
||||
unmuteChat(chatId: string): Promise<void>
|
||||
unmuteChat(chatId: string): Promise<{ isMuted: boolean, muteExpiration: number }>
|
||||
|
||||
/** Sets the current user's profile picture */
|
||||
setProfilePicture(media: MessageMedia): Promise<boolean>
|
||||
|
|
@ -1468,10 +1468,10 @@ declare namespace WAWebJS {
|
|||
/** Loads chat messages, sorted from earliest to latest. */
|
||||
fetchMessages: (searchOptions: MessageSearchOptions) => Promise<Message[]>,
|
||||
/** Mutes this chat forever, unless a date is specified */
|
||||
mute: (unmuteDate?: Date) => Promise<void>,
|
||||
mute: (unmuteDate?: Date) => Promise<{ isMuted: boolean, muteExpiration: number }>,
|
||||
/** Send a message to this chat */
|
||||
sendMessage: (content: MessageContent, options?: MessageSendOptions) => Promise<Message>,
|
||||
/** Set the message as seen */
|
||||
/** Set the chat as seen */
|
||||
sendSeen: () => Promise<void>,
|
||||
/** Simulate recording audio in chat. This will last for 25 seconds */
|
||||
sendStateRecording: () => Promise<void>,
|
||||
|
|
@ -1480,7 +1480,7 @@ declare namespace WAWebJS {
|
|||
/** un-archives this chat */
|
||||
unarchive: () => Promise<void>,
|
||||
/** Unmutes this chat */
|
||||
unmute: () => Promise<void>,
|
||||
unmute: () => Promise<{ isMuted: boolean, muteExpiration: number }>,
|
||||
/** Returns the Contact that corresponds to this Chat. */
|
||||
getContact: () => Promise<Contact>,
|
||||
/** Marks this Chat as unread */
|
||||
|
|
|
|||
Loading…
Reference in a new issue