refactor: turn DC_CHAT_ID_* into ChatId::* associated constants

We already have it done for ContactId.
This commit is contained in:
link2xt
2026-08-22 00:55:07 +00:00
committed by l
parent 0b2ff5d0e2
commit fe25e93d6c
19 changed files with 98 additions and 116 deletions

View File

@@ -19,7 +19,6 @@ use quick_xml::events::{BytesEnd, BytesStart, BytesText};
use tokio::time::timeout;
use crate::chat::{self, ChatId};
use crate::constants::DC_CHAT_ID_TRASH;
use crate::contact::ContactId;
use crate::context::Context;
use crate::events::EventType;
@@ -504,7 +503,7 @@ pub(crate) async fn delete_orphaned_poi(context: &Context) -> Result<()> {
(SELECT location_id from MSGS LEFT JOIN locations
ON locations.id=location_id
WHERE location_id>0 -- This check makes the query faster by not looking for locations with ID 0 that don't exist.
AND msgs.chat_id != ?)", (DC_CHAT_ID_TRASH,)).await?;
AND msgs.chat_id != ?)", (ChatId::TRASH,)).await?;
Ok(())
}