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
parent 4338664590
commit 06107af67d
3 changed files with 12 additions and 11 deletions

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);
}