@@ -9,7 +9,6 @@ use rusqlite::{Connection, OpenFlags, Row, config::DbConfig, types::ValueRef};
99use tokio:: sync:: RwLock ;
1010
1111use crate :: blob:: BlobObject ;
12- use crate :: chat:: add_device_msg;
1312use crate :: config:: Config ;
1413use crate :: constants:: DC_CHAT_ID_TRASH ;
1514use crate :: context:: Context ;
@@ -18,12 +17,11 @@ use crate::ephemeral::start_ephemeral_timers;
1817use crate :: imex:: BLOBS_BACKUP_NAME ;
1918use crate :: location:: delete_orphaned_poi_locations;
2019use crate :: log:: { LogExt , warn} ;
21- use crate :: message:: { Message , MsgId } ;
20+ use crate :: message:: MsgId ;
2221use crate :: net:: dns:: prune_dns_cache;
2322use crate :: net:: http:: http_cache_cleanup;
2423use crate :: net:: prune_connection_history;
2524use crate :: param:: { Param , Params } ;
26- use crate :: stock_str;
2725use crate :: tools:: { SystemTime , Time , delete_file, time, time_elapsed} ;
2826
2927/// Extension to [`rusqlite::ToSql`] trait
@@ -216,26 +214,13 @@ impl Sql {
216214 // this should be done before updates that use high-level objects that
217215 // rely themselves on the low-level structure.
218216
219- // `update_icons` is not used anymore, since it's not necessary anymore to "update" icons:
220- let ( _update_icons, disable_server_delete, recode_avatar) = migrations:: run ( context, self )
217+ let recode_avatar = migrations:: run ( context, self )
221218 . await
222219 . context ( "failed to run migrations" ) ?;
223220
224221 // (2) updates that require high-level objects
225222 // the structure is complete now and all objects are usable
226223
227- if disable_server_delete {
228- // We now always watch all folders and delete messages there if delete_server is enabled.
229- // So, for people who have delete_server enabled, disable it and add a hint to the devicechat:
230- if context. get_config_delete_server_after ( ) . await ?. is_some ( ) {
231- let mut msg = Message :: new_text ( stock_str:: delete_server_turned_off ( context) . await ) ;
232- add_device_msg ( context, None , Some ( & mut msg) ) . await ?;
233- context
234- . set_config_internal ( Config :: DeleteServerAfter , Some ( "0" ) )
235- . await ?;
236- }
237- }
238-
239224 if recode_avatar && let Some ( avatar) = context. get_config ( Config :: Selfavatar ) . await ? {
240225 let mut blob = BlobObject :: from_path ( context, Path :: new ( & avatar) ) ?;
241226 match blob. recode_to_avatar_size ( context) . await {
0 commit comments