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!
This commit is contained in:
Dirk-Jan C. Binnema
2024-04-01 20:51:40 +03:00
parent 2e40852abc
commit d13feb2d99
4 changed files with 58 additions and 56 deletions

View File

@ -116,7 +116,6 @@ public:
*/
bool is_personal(const std::string& addr) const;
/**
* Does this look like an email-address that should be ignored?
*
@ -126,6 +125,15 @@ public:
*/
bool is_ignored(const std::string& addr) const;
/**
* Does this look like a valid email-address?
*
* @param addr some e-mail address
*
* @return true or false
*/
bool is_valid(const std::string& addr) const;
/**
* Find a contact based on the email address. This is not safe, since
* the returned ptr can be invalidated at any time; only for unit-tests.