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:
alechkos 2025-05-30 16:41:31 +03:00 • committed by GitHub
commit 91217f87ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -461,7 +461,7 @@ exports.LoadUtils = () => {
let res = chat.serialize();
res.isGroup = false;
res.formattedTitle = chat.formattedTitle;
res.isMuted = chat.muteExpiration == 0 ? false : true;
res.isMuted = chat.mute?.expiration !== 0;
if (chat.groupMetadata) {
res.isGroup = true;