properties: support system-properties

Support "system" properties, i.e., library versions, whether
language-detection, scm is supported.

Make these more generic (with display strings), so we can handle them
more automatic int mu-cmd-info.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-22 14:56:27 +03:00
committed by Seth Ladygo
parent f3361b9cee
commit a347d3ada0
9 changed files with 215 additions and 150 deletions

View File

@ -110,8 +110,8 @@ struct Store::Private {
}
Message::Options make_message_options(const Config& conf) {
if (conf.get<Config::Id::SupportNgrams>())
return Message::Options::SupportNgrams;
if (conf.get<Config::Id::NgramsEnabled>())
return Message::Options::NgramsEnabled;
else
return Message::Options::None;
}
@ -369,8 +369,8 @@ Store::add_message(Message& msg, bool is_new)
return Err(res.error());
// we shouldn't mix ngrams/non-ngrams messages.
if (any_of(msg.options() & Message::Options::SupportNgrams) !=
any_of(message_options() & Message::Options::SupportNgrams))
if (any_of(msg.options() & Message::Options::NgramsEnabled) !=
any_of(message_options() & Message::Options::NgramsEnabled))
return Err(Error::Code::InvalidArgument, "incompatible message options");
/* add contacts from this message to cache; this cache