mirror of
https://github.com/chatmail/core.git
synced 2026-10-02 03:00:40 +03:00
refactor: rename _ex() -> _ext()
"ex" means "used to be, but no longer is". "ext" means "extended", which is the intended meaning. "Ext" is more common not only in the Rust ecosystem but in general. We already had several people (myself included) asking what "ex" is supposed to mean. To reproduce this commit, search and replace `_ex(?!\w)` -> `_ext`. But don't change `list_transports_ex` because it's public API.
This commit is contained in:
+10
-9
@@ -1095,7 +1095,7 @@ pub async fn from_field_to_contact_id(
|
||||
}
|
||||
}
|
||||
|
||||
let (from_id, _) = Contact::add_or_lookup_ex(
|
||||
let (from_id, _) = Contact::add_or_lookup_ext(
|
||||
context,
|
||||
display_name.unwrap_or_default(),
|
||||
&from_addr,
|
||||
@@ -1229,7 +1229,8 @@ async fn decide_chat_assignment(
|
||||
} = &mime_parser.pre_message
|
||||
{
|
||||
let post_msg_exists = if let Some((msg_id, not_downloaded)) =
|
||||
message::rfc724_mid_exists_ex(context, post_msg_rfc724_mid, "download_state<>0").await?
|
||||
message::rfc724_mid_exists_ext(context, post_msg_rfc724_mid, "download_state<>0")
|
||||
.await?
|
||||
{
|
||||
context
|
||||
.sql
|
||||
@@ -1617,7 +1618,7 @@ async fn do_chat_assignment(
|
||||
{
|
||||
chat_created = true;
|
||||
chat_id = Some(
|
||||
chat::create_out_broadcast_ex(
|
||||
chat::create_out_broadcast_ext(
|
||||
context,
|
||||
Nosync,
|
||||
listid,
|
||||
@@ -1691,7 +1692,7 @@ async fn do_chat_assignment(
|
||||
chat_id_blocked = chat.blocked;
|
||||
|
||||
if Blocked::Not != chat.blocked {
|
||||
chat.id.unblock_ex(context, Nosync).await?;
|
||||
chat.id.unblock_ext(context, Nosync).await?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1699,7 +1700,7 @@ async fn do_chat_assignment(
|
||||
if chat_id_blocked != Blocked::Not
|
||||
&& let Some(chat_id) = chat_id
|
||||
{
|
||||
chat_id.unblock_ex(context, Nosync).await?;
|
||||
chat_id.unblock_ext(context, Nosync).await?;
|
||||
chat_id_blocked = Blocked::Not;
|
||||
}
|
||||
}
|
||||
@@ -2380,7 +2381,7 @@ async fn handle_edit_delete(
|
||||
} else if let Some(rfc724_mid_list) = mime_parser.get_header(HeaderDef::ChatDelete)
|
||||
&& let Some(part) = mime_parser.parts.first()
|
||||
{
|
||||
// See `message::delete_msgs_ex()`, unlike edit requests, DC doesn't send unencrypted
|
||||
// See `message::delete_msgs_ext()`, unlike edit requests, DC doesn't send unencrypted
|
||||
// deletion requests, so there's no need to support them.
|
||||
if part.param.get_bool(Param::GuaranteeE2ee) != Some(true) {
|
||||
warn!(context, "Delete message: Not encrypted.");
|
||||
@@ -2742,7 +2743,7 @@ async fn lookup_or_create_adhoc_group(
|
||||
Ok(val)
|
||||
};
|
||||
let query_only = true;
|
||||
if let Some((chat_id, blocked)) = context.sql.transaction_ex(query_only, trans_fn).await? {
|
||||
if let Some((chat_id, blocked)) = context.sql.transaction_ext(query_only, trans_fn).await? {
|
||||
info!(
|
||||
context,
|
||||
"Assigning message to ad-hoc group {chat_id} with matching name and members."
|
||||
@@ -4147,7 +4148,7 @@ async fn add_or_lookup_key_contacts(
|
||||
};
|
||||
let display_name = info.display_name.as_deref();
|
||||
if let Ok(addr) = ContactAddress::new(addr) {
|
||||
let (contact_id, _) = Contact::add_or_lookup_ex(
|
||||
let (contact_id, _) = Contact::add_or_lookup_ext(
|
||||
context,
|
||||
display_name.unwrap_or_default(),
|
||||
&addr,
|
||||
@@ -4321,7 +4322,7 @@ async fn lookup_key_contacts_fallback_to_chat(
|
||||
let fingerprint: String = fp.hex();
|
||||
|
||||
if let Ok(addr) = ContactAddress::new(addr) {
|
||||
let (contact_id, _) = Contact::add_or_lookup_ex(
|
||||
let (contact_id, _) = Contact::add_or_lookup_ext(
|
||||
context,
|
||||
display_name.unwrap_or_default(),
|
||||
&addr,
|
||||
|
||||
Reference in New Issue
Block a user