RFC822.MailboxAddress.has_distinct_name() really needs to not do
sub-string checks since it will cause addresses like
`"foo-bar@baz" <bar@baz>` to not have a distinct name. To keep the fix
for #491 in effect, also adds special case checking for sinlge quotes.
Add some more tests to cover these cases.
Partially reverts commit 6e137eb649
See discussion in GNOME/geary!252
Allow getting both the earliest and latest log records from
Geary.Logging and record these when constructing new ProblemReport
instances. Update InspectorLogView.load to have starting and end log
record parameters, and specify these when displaying a problem report.
This ensures that only those log records up to the point of the problem
report being generated are included in the report, and not any later
records.
This allows ImapDB unit tests to avoid running the process when it
really doesn't need to be run. Should fix anther criticial about
ImapDB being null (see previous commit).
This shoud fix Geary.ImapDb.DatabaseTest test failing with a critical:
```
geary-CRITICAL **: 05:02:51.688: geary_db_database_get_is_open:
assertion 'GEARY_DB_IS_DATABASE (self)' failed
```
Doing so constitutes a circular ref, but since it is broken once GC is
complete anyway, it shouldn't be a problem.
Move args from open_async to ctor and use these to determine and store
DB file and attachment paths as properties. This allows constructing
the DB instance up front and markig it as non-nullable, simplifies
calling patterns and hence allows removing one use of the deprecated
Engine singleton, and by moving in the local data deletion
implementation from ImapEngine.GenericAccount, also allows removing a
static helper method.
Add a ContactHarvester arg to ImapDB.Folder.create_or_merge_email and
call it on the resulting email. Add and update a new harvester
property to MinimalFolder and pass that in as needed.
Replaces harvesting code in ImapDB code so as to be stand-alone and
reusable. Implement harvesting policy to only harvest from a set of
whitelisted special folder types (so junk and trash is not harvested)
and only harvest valid, non-spoofed, addresses.
Remove contact harvesting from DB version 005 (version 0.1.1), allowing
the implementation of both ContactStoreImpl and ImapDB.Database to be
cleaned up. Remove contact collection from ImapDB.Folder, reducing the
numer of Gee objects created when creating/merging messages. Finally,
remove the MessageAddresses object now that it is unused.
Prepare for doing composer autocomplete via queries by not loading all
contacts at startup in the engine. Update Geary.ContactStore API to that
end, and convert Geary.Account.get_contact_store accessor method to a
property.
The changes to Imap.Command broke the originial workaround added in
commit 3940bf7d for mail.ru's non-compliant interpretation of IMAP
FETCH BODY header fields.
This cleans up the implementation a bit and re-enables it.
See issue #410
Use string.get_next_char() to handle iterating over an
RFC822.MailboxAddress mailbox local part, and explicitly allow UTF-8
2, 3, and 4 byte chars without quoting, per RFC 5322.
This lets us fix the test cases that use UTF-8 chars in the local part.