1. 14 Mar, 2019 1 commit
  2. 09 Mar, 2019 3 commits
    • Michael Gratton's avatar
      Attempt to de-mangle From names from Mailman, GitLab, etc · 6c8f1921
      Michael Gratton authored
      Some software like the above will mangle From mailbox names by appending
      "via Some Service" to the From mailbox name. This messes up generating
      default avatars for the actual people sending these messages, so
      attempt to de-mangle the names.
      This involves moving primary originator determination from the engine
      to the client, since it's now a policy thing. Add unit tests.
    • Michael Gratton's avatar
      Add a common interface for accessing headers from email classes. · 133167df
      Michael Gratton authored
      This allows either type to be used interchangably as a source of
      header data. Add documentation comments for the headers, add missing
      message_id property to RFC822.Message.
    • Michael Gratton's avatar
      Fix SMTP auth errors when using IMAP credentials · cd8ed405
      Michael Gratton authored
      AccountInformation.load_outgoing_credentials (and incoming) should be
      true in case there's no credentials, but also loading ougoing must use
      the incoming service and credentials when USE_INCOMING is set.
      Fixes SMTP side of #301 at least.
  3. 07 Mar, 2019 1 commit
    • Michael Gratton's avatar
      Ensure that cancelled commands throw a cancelled error, not a timeout · 2c8a232f
      Michael Gratton authored
      Commands that were cancelled, e.g. because the network connection was
      lost and so commands in progress were backed out, were throwing
      timeout errors to callers of wait_until_complete since they had received
      no response. This was causing e.g. account operations to fail, and the
      alleged timeout be reported as problem in the UI.
      This takes note of whether a command was cancelled and throws an
      appropriate error in wait_until_complete if so. Callers can then clean
      up and choose to be more circumspect in their error reporting.
      Fixes #285
  4. 06 Mar, 2019 1 commit
    • Michael Gratton's avatar
      Don't prompt for passwords from deep within the engine · 085518a6
      Michael Gratton authored
      The fix for !161 moved updating credentials to reasonably deep within
      the IMAP service to fix some poor behaviour for GOA accounts, however
      local accounts would still prompt for a password if not present in
      libsecret from there, and if cancelled would prompt as many times as the
      service attempted to re-open the pool.
      This removes the call to prompt for a password from the libsecret
      mediator, brings back some of the API removed by commit c8f5e029, so
      that services can tell if credentials weren't loaded, and hence notify
      appropriately so the controller can then do the prompting.
  5. 04 Mar, 2019 1 commit
  6. 03 Mar, 2019 2 commits
    • Michael Gratton's avatar
      Fix GOA accounts throwing an error when starting offline · 82160e9f
      Michael Gratton authored
      Don't check service credentials are loaded when the account is being
      opened, since GOA accounts will do a
      org.gnome.OnlineAccounts.Account::EnsureCredentials() call, and this
      will error out if the creds are invalid or not available.
      Instead, check when we know that the services should be reachable, and
      hope that means the GOA provider's auth service is reachable, too.
    • Michael Gratton's avatar
      Fix critical and clean up error handling in FetchEmail replay op · 224ccb18
      Michael Gratton authored
      Don't assume target email is non-null after fetching from local store
      since it might be if not present and it needs to be fetched from the
      remote. Also, just throw the NOT_FOUND error when local-only, and don't
      bother checking for INCOMPLETE_MESSAGE since it's specified that partial
      is okay anyway.
  7. 02 Mar, 2019 2 commits
  8. 01 Mar, 2019 1 commit
  9. 28 Feb, 2019 1 commit
    • Kristian Klausen's avatar
      Remove trailing whitespace · 48c93655
      Kristian Klausen authored
      find . -name '*.vala' -type f -exec sed -i 's/ *$//g' {} +
      The following files was ignored:
      Fix #271
  10. 27 Feb, 2019 1 commit
  11. 22 Feb, 2019 1 commit
  12. 21 Feb, 2019 5 commits
  13. 20 Feb, 2019 8 commits
    • Michael Gratton's avatar
    • Kristian Klausen's avatar
      Fix UpdateMailboxCommand to work correctly when there is only a single mailbox · 843c31db
      Kristian Klausen authored
      This commit update UpdateMailboxCommand to use a new function
      ("replace_sender") to replace a existing mailbox, instead of
      remove/insert, which doesn't work if the number of mailboxes is 1.
      This fix two bugs (if number of mailboxes is 1):
      1. The "name" couldn't be updated.
      2. If you did change the address, the old mailbox wasn't removed.
      See also #226
    • Michael Gratton's avatar
      Fix inifinite loop removing folders that have disappeared · 02692466
      Michael Gratton authored
      Brown paper bag misuse of BidiIterator 🙄
    • Michael Gratton's avatar
      Fix FillWindowOperation not expanding vector when at end of it · 2b2f99d1
      Michael Gratton authored
      This ensure that if a call to MinimalFolder.list_email_by_id() includes
      a non-null initial_id, that its UID is always looked up. This fixes a
      bug where if it is called with an initial ID, going newest to oldest,
      and the id is the earliest email in the vector, no expansion will take
      This was occurring when scrolling the conversation list to the bottom,
      and the ConversationMonitor had already reached the bottom of the
      vector, so the fill op was trying to expand it. Since the last message
      in the vector was given as the initial_id, but the fill op does not set
      INCLUDE_ID, the UID for that email was never found. That caused the
      vector expansion to use the end of the vector as the upper UID instead
      of the this email at the start of the vector, and hence the lower UID
      of the expansion was usually after the start of the vector, since
      there's usally more messages in the vector than the fill op was
      requesting. Thus no vector expansion actually took place, since the
      lower and upper bounds were already included within the vector, and
      hence no new messages were loaded by the fill op.
      Fixes #219
    • Michael Gratton's avatar
      Trivial code cleanup · 9378795d
      Michael Gratton authored
    • Michael Gratton's avatar
      Fix one very wrong word in a comment · f7f69e9e
      Michael Gratton authored
      Per the Geary.Folder.list_email_by_id API docs, if the initial UID is a
      vector expansion is wrong, it defaults to the end of the *vector*, not
      the remote.
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Allow both accounts and services to have provider-specific defaults · 54752902
      Michael Gratton authored
      This updates both AccountInformation and ServiceInformation to
      implicitly apply provide-specific defaults, allowing the same
      mechanism to provide defaults for accounts, and meaning that API
      clients do not need to do this themselves any more. Add unit tests.
  14. 19 Feb, 2019 4 commits
  15. 18 Feb, 2019 2 commits
    • Michael Gratton's avatar
      Retry using IPv4 only when connecting to an endpoint fails · 7fe445a9
      Michael Gratton authored
      Ubuntu 18.04 for some reason started throwing "Network unavailable"
      errors when an AAAA record was resolved for host name but no valid IPv6
      network was available. Work around by re-attempting once using IPv4
      See issue #217.
    • Michael Gratton's avatar
      Prevent circular refs using idle and timeout manager when running · f48170ae
      Michael Gratton authored
      If an IdleManager or TimeoutManager had been scheduled, it would not get
      destroyed until it was executed by the main loop, causing criticals
      if the objects enclosed by its callback had been destroyed.
      This adds a weak reference to the manager object itself when scheduling
      on the main loop, so it can get safely dropped.
  16. 17 Feb, 2019 2 commits
  17. 16 Feb, 2019 3 commits
    • Michael Gratton's avatar
      Ensure conversations that have no email in the base folder are dropped · 9619d18e
      Michael Gratton authored
      If a least one email in a conversation that is in the base folder but
      also in another is removed from the base folder, the conversation may
      not be removed from the monitor despite possibly not having any email
      in the base folder, since the email may not have been completely removed
      from the conversation.
      This was particulary being seen with GMail accounts where even single
      message conversations were not disappering when trashed because the
      converation's email was still in All Mail.
      This fix does a few things: Avoids hitting the database when checking
      a conversation still has email in the base folder, when it does check
      only ensures that email are in the base folder, not *any* folder, and
      updates ConversationSet::remove_all_emails_by_identifier to do this
      check iternally, clean up its API and implementation and avoids having
      to use out args calling it.
    • Michael Gratton's avatar
      Add base_folder property back to ConversationSet · 67bf1183
      Michael Gratton authored
      Athough it was removed a while back, add it back since it is not only
      needed when adding conversations, but also when removing email from
      conversations to be able to detect when a conversation should be
    • Michael Gratton's avatar
      Prevent circular refs using idle and timeout manager when running · 3cda1b5c
      Michael Gratton authored
      If an IdleManager or TimeoutManager had been scheduled, it would not get
      destroyed until it was executed by the main loop, causing criticals
      if the objects enclosed by its callback had been destroyed.
      This adds a weak reference to the manager object itself when scheduling
      on the main loop, so it can get safely dropped.
  18. 15 Feb, 2019 1 commit