Origin::is_verified() -> Origin::is_known() because this has nothing to do with verified groups or contacts

This commit is contained in:
holger krekel
2019-12-19 14:33:46 +01:00
parent 5f200c6bc3
commit 6c14e429eb
2 changed files with 7 additions and 6 deletions

View File

@@ -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.

View File

@@ -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
{