Commit Graph

22 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema d13feb2d99 mu-contact: move email validation to contacts cache
So we can be sure the regexp is initialized. This _may_ help for
 https://bugzilla.opensuse.org/show_bug.cgi?id=1221861
though it is very hard to tell!
2024-04-02 07:40:20 +03:00
Dirk-Jan C. Binnema 6dac4423e2 mu-contacts: remove some debug logging 2023-10-30 22:55:37 +02:00
Dirk-Jan C. Binnema 545494225a lib/contacts-cache: improve code 2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema 31f0c40893 migrate to fmt-based logging in some more places
and improve logging.
2023-07-08 10:30:36 +03:00
Dirk-Jan C. Binnema 4920b56671 update to use fmt-based apis
Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
2023-07-05 23:10:13 +03:00
Dirk-Jan C. Binnema c4b5795328 cli: support --ignored-address for init command
Allow for skipping unwanted addresses (such as 'noreply') from the
contacts cache.
2023-07-02 10:00:40 +03:00
Dirk-Jan C. Binnema 5dc41ed811 lib: support ignoring addresses for contacts-cache
Skip annoying 'noreply' & friends.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema 2acc1c2271 lib/contacts-cache: rework using config
Use the new config class to pass information and serialization.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema 413a2564b6 server: don't encode addresses in contacts_handlers
Seems it doesn't always play nice with composer
2023-02-28 23:23:52 +02:00
Dirk-Jan C. Binnema 2255769de7 build: bump schema version, update contacts-cache
Bump schema version to trigger update after we added html processing.

Since we're updating the database schema version, let's use the
opportunity to remove outdated data from the contacts-cache.
2023-01-31 23:41:57 +02:00
Dirk-Jan C. Binnema 2229e2e77e message/contact: ensure valid email address in cache
Filter out the (rare but existent) invalid email addresses from the
cache; use the new method Contact::has_valid_email for that.
2022-12-30 11:51:21 +02:00
Dirk-Jan C. Binnema 27ecbbdd65 many: use Mu::Regex instead of std::regex
The former is PCRE-compatible, and faster than std::regex.
2022-12-30 11:15:03 +02:00
Dirk-Jan C. Binnema 317fe53ff7 tests: update test helpers and users
Move test-mu-common to mu-test-utils. Use mu_test_init as a wrapper for
g_test_init. Update users.
2022-08-11 22:55:10 +03:00
Dirk-Jan C. Binnema 13f0e24241 lib: improve test coverage
Add a bunch of tests
2022-06-02 21:07:41 +03:00
Dirk-Jan C. Binnema 81689f0af3 contacts-cache: return most relevant contacts
Return in the contacts in *reverse* rank order, i.e. the most relevant come first.
This is useful since we only want the first maxnum contacts, and those should of
course be the most relevant.

Update mu cfind/server as well.

cfind
2022-05-09 22:25:28 +03:00
Dirk-Jan C. Binnema 836bfc9062 mu/mu4e: implement mu4e-compose-complete-max
Allow limiting number of contacts for auto-completion to a specific number;
defaulting to 2000.
2022-05-06 21:58:51 +03:00
Dirk-Jan C. Binnema ee4b3bda2d message: support 'personal' flag for messages
Add a new flag 'personal' for a message, which means that at least one of the
contact fields is personal.
2022-05-05 01:38:25 +03:00
Dirk-Jan C. Binnema bb6d271a23 contacts-cache: handle 'personal' mail for groups
When passing a vec of _all_ contacts for some message, mark _all_ of them as
personal if at least _one_ is a personal address.
2022-04-30 09:02:13 +03:00
Dirk-Jan C. Binnema f7c84006d7 many: update for lib/message updates
Adapt to the new names / directory. Big commit, but mostly just very boring renaming.
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema 52c31afef1 contacts-cache: refactor personal check 2022-03-07 06:50:18 +02:00
Dirk-Jan C. Binnema 4b9814be25 contacts-cache: Rework to use MessageContact
Replace the internal ContactInfo with MessageContact, so we can use the same
type throughout.
2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema a82bd77d09 lib: rename contacts into contacts-cache
Plus dependents.
2022-02-21 23:22:42 +02:00