mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
cargo fmt
This commit is contained in:
committed by
holger krekel
parent
fe23907eb3
commit
c2c0c81f1c
12
src/chat.rs
12
src/chat.rs
@@ -2073,12 +2073,12 @@ impl rusqlite::types::FromSql for MuteDuration {
|
|||||||
pub fn set_muted(context: &Context, chat_id: ChatId, duration: MuteDuration) -> Result<(), Error> {
|
pub fn set_muted(context: &Context, chat_id: ChatId, duration: MuteDuration) -> Result<(), Error> {
|
||||||
ensure!(!chat_id.is_special(), "Invalid chat ID");
|
ensure!(!chat_id.is_special(), "Invalid chat ID");
|
||||||
if sql::execute(
|
if sql::execute(
|
||||||
context,
|
context,
|
||||||
&context.sql,
|
&context.sql,
|
||||||
"UPDATE chats SET muted_until=? WHERE id=?;",
|
"UPDATE chats SET muted_until=? WHERE id=?;",
|
||||||
params![duration, chat_id],
|
params![duration, chat_id],
|
||||||
)
|
)
|
||||||
.is_ok()
|
.is_ok()
|
||||||
{
|
{
|
||||||
context.call_cb(Event::ChatModified(chat_id));
|
context.call_cb(Event::ChatModified(chat_id));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user