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.
This commit is contained in:
Dirk-Jan C. Binnema
2022-05-01 11:18:57 +03:00
parent a4f39819ee
commit ee4b3bda2d
5 changed files with 33 additions and 10 deletions

View File

@ -221,9 +221,9 @@ ContactsCache::add(Contact&& contact)
void
ContactsCache::add(Contacts&& contacts)
ContactsCache::add(Contacts&& contacts, bool& personal)
{
const auto personal = seq_find_if(contacts,[&](auto&& c){
personal = seq_find_if(contacts,[&](auto&& c){
return is_personal(c.email); }) != contacts.cend();
for (auto&& contact: contacts) {