mirror of https://github.com/djcb/mu.git
message: don't check language without cld2 support
No point in checking if we do not have the support.
This commit is contained in:
parent
82235b9d49
commit
75a2cab3f1
|
@ -532,6 +532,8 @@ process_message(const MimeMessage& mime_msg, const std::string& path,
|
|||
if (info.mailing_list)
|
||||
info.flags |= Flags::MailingList;
|
||||
|
||||
#ifdef HAVE_CLD2
|
||||
/* language detection requires the cld2 lib */
|
||||
if (info.body_txt) { /* attempt to get the body-language */
|
||||
if (const auto lang{detect_language(info.body_txt.value())}; lang) {
|
||||
info.language = lang->code;
|
||||
|
@ -539,6 +541,7 @@ process_message(const MimeMessage& mime_msg, const std::string& path,
|
|||
} else
|
||||
mu_debug("could not detect language");
|
||||
}
|
||||
#endif /*HAVE_CLD2*/
|
||||
}
|
||||
|
||||
static Mu::Result<std::string>
|
||||
|
|
Loading…
Reference in New Issue