add: ability to mute chats

This commit is contained in:
trisua 2025-09-08 23:09:16 -04:00
parent ff1c739367
commit 01fa758e63
11 changed files with 121 additions and 7 deletions

View file

@ -441,3 +441,23 @@ function clear_notifications() {
}
});
}
function mute_chat() {
fetch(`/api/v1/chats/${STATE.chat_id}/mute`, {
method: "POST",
})
.then((res) => res.json())
.then((res) => {
show_message(res.message, res.ok);
});
}
function unmute_chat() {
fetch(`/api/v1/chats/${STATE.chat_id}/mute`, {
method: "DELETE",
})
.then((res) => res.json())
.then((res) => {
show_message(res.message, res.ok);
});
}