Allow a chat to be muted indefinitely (#849)

* muteChat fixed

* Update src/Client.js

Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>

* Update src/Client.js

Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>

* date fix

Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This commit is contained in:
Rajeh Taher 2021-10-30 06:24:36 +03:00 • committed by GitHub
commit 06107af67d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,10 +147,10 @@ class Chat extends Base {
}
/**
* Mutes this chat until a specified date
* @param {Date} unmuteDate Date at which the Chat will be unmuted
* Mutes this chat forever, unless a date is specified
* @param {?Date} unmuteDate Date at which the Chat will be unmuted, leave as is to mute forever
*/
async mute(unmuteDate) {
async mute(unmuteDate = undefined) {
return this.client.muteChat(this.id._serialized, unmuteDate);
}