mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Origin::is_verified() -> Origin::is_known() because this has nothing to do with verified groups or contacts
This commit is contained in:
@@ -114,9 +114,10 @@ impl Default for Origin {
|
||||
}
|
||||
|
||||
impl Origin {
|
||||
/// Contacts that are verified and known not to be spam.
|
||||
pub fn is_verified(self) -> bool {
|
||||
self as i32 >= 0x100
|
||||
/// Contacts that are known, i. e. they came in via accepted contacts or
|
||||
/// themselves an accepted contact.
|
||||
pub fn is_known(self) -> bool {
|
||||
self >= Origin::IncomingReplyTo
|
||||
}
|
||||
|
||||
/// Contacts that are shown in the contact list.
|
||||
|
||||
@@ -144,7 +144,7 @@ pub fn dc_receive_imf(
|
||||
&field,
|
||||
if !incoming {
|
||||
Origin::OutgoingTo
|
||||
} else if incoming_origin.is_verified() {
|
||||
} else if incoming_origin.is_known() {
|
||||
Origin::IncomingTo
|
||||
} else {
|
||||
Origin::IncomingUnknownTo
|
||||
@@ -427,7 +427,7 @@ fn add_parts(
|
||||
context,
|
||||
"Message is a reply to a known message, mark sender as known.",
|
||||
);
|
||||
if !incoming_origin.is_verified() {
|
||||
if !incoming_origin.is_known() {
|
||||
incoming_origin = Origin::IncomingReplyTo;
|
||||
}
|
||||
}
|
||||
@@ -443,7 +443,7 @@ fn add_parts(
|
||||
// to not result in a chatlist-contact-request (this would require the state FRESH)
|
||||
if Blocked::Not != chat_id_blocked
|
||||
&& state == MessageState::InFresh
|
||||
&& !incoming_origin.is_verified()
|
||||
&& !incoming_origin.is_known()
|
||||
&& msgrmsg == 0
|
||||
&& show_emails != ShowEmails::All
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user