generated from t/malachite
add: ability to mute chats
This commit is contained in:
parent
ff1c739367
commit
01fa758e63
11 changed files with 121 additions and 7 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue