mirror of
https://github.com/chatmail/core.git
synced 2026-05-12 03:16:29 +03:00
reset selfavatar_sent column when the selfavatar is updated
This commit is contained in:
committed by
holger krekel
parent
251aa22c4c
commit
ea2273aef4
@@ -9,6 +9,7 @@ use crate::context::Context;
|
|||||||
use crate::dc_tools::*;
|
use crate::dc_tools::*;
|
||||||
use crate::job::*;
|
use crate::job::*;
|
||||||
use crate::stock::StockMessage;
|
use crate::stock::StockMessage;
|
||||||
|
use rusqlite::NO_PARAMS;
|
||||||
|
|
||||||
/// The available configuration keys.
|
/// The available configuration keys.
|
||||||
#[derive(
|
#[derive(
|
||||||
@@ -129,7 +130,10 @@ impl Context {
|
|||||||
match key {
|
match key {
|
||||||
Config::Selfavatar if value.is_some() => {
|
Config::Selfavatar if value.is_some() => {
|
||||||
let blob = BlobObject::new_from_path(&self, value.unwrap())?;
|
let blob = BlobObject::new_from_path(&self, value.unwrap())?;
|
||||||
self.sql.set_raw_config(self, key, Some(blob.as_name()))
|
let ret = self.sql.set_raw_config(self, key, Some(blob.as_name()));
|
||||||
|
self.sql
|
||||||
|
.execute("UPDATE contacts SET selfavatar_sent=0;", NO_PARAMS)?;
|
||||||
|
ret
|
||||||
}
|
}
|
||||||
Config::InboxWatch => {
|
Config::InboxWatch => {
|
||||||
let ret = self.sql.set_raw_config(self, key, value);
|
let ret = self.sql.set_raw_config(self, key, value);
|
||||||
|
|||||||
Reference in New Issue
Block a user