mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +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> {
|
||||
ensure!(!chat_id.is_special(), "Invalid chat ID");
|
||||
if sql::execute(
|
||||
context,
|
||||
&context.sql,
|
||||
"UPDATE chats SET muted_until=? WHERE id=?;",
|
||||
params![duration, chat_id],
|
||||
)
|
||||
.is_ok()
|
||||
context,
|
||||
&context.sql,
|
||||
"UPDATE chats SET muted_until=? WHERE id=?;",
|
||||
params![duration, chat_id],
|
||||
)
|
||||
.is_ok()
|
||||
{
|
||||
context.call_cb(Event::ChatModified(chat_id));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user