<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thunderbird 74 beta 1 will be out this week. Here's a list of
      what changed in APIs:<br>
    </p>
    <p><b>The legacy API has been removed.</b> This has been covered
      elsewhere so I'm not going to say any more.<br>
    </p>
    <p><b>The </b><b><a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/folders.html#mailfolder">MailFolder</a></b><b>
        object gained a </b><b><tt>subFolders</tt></b><b> property.
        From now on the </b><b><a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/accounts.html">accounts
          API functions</a></b><b> will return a hierarchy of folders
        instead of a flat list.</b> If you still need a flat list you
      should traverse the folder hierarchy:<br>
    </p>
    <pre><span class="pl-k">browser.accounts.list().then(accounts => {</span><span class="pl-k">
  let arrayOfFolders = [];

  function traverse(folders) {
    if (!folders) {
      return;
    }
    for (let f of folders) {
      arrayOfFolders.push(f);
      traverse(f.subFolders);
    }
  }

  for (let account of accounts) {
    traverse(account.folders);
  }
  return arrayOfFolders;
});
</span><span class="pl-k"></span></pre>
    <p>This example code works with both the current API in 68 and the
      new version in 74 (which will be backported to 68 after some time
      in beta).</p>
    <p><b>The compose API gained two new functions and an event.</b> The<b>
      </b><a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/compose.html#getcomposedetails-tabid">getComposeDetails</a>
      and <a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/compose.html#setcomposedetails-tabid-details">setComposeDetails</a>
      functions let you retrieve or change the recipients and subject of
      a message being composed. More details will be added later. The <a
        moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/compose.html#onbeforesend-details">onBeforeSend</a>
      event is fired when a message is about to be sent. At this point
      your extension can prevent sending or change the same details as
      in the new functions.</p>
    <p><b>The <a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/messages.html#query-queryinfo">messages.query</a>
        function can now query by tags.</b></p>
    <p><b>The <a moz-do-not-send="true"
href="https://thunderbird-webextensions.readthedocs.io/en/latest/messages.html#messageheader">MessageHeader</a>
        object now has junk properties.</b> <tt>junkScore</tt> is an
      integer score from 0 (not spam) to 100 (spam). <tt>junk</tt>
      shows whether or not that score is greater than the junk
      threshold.</p>
    <p>I hope to have some example code soon, particularly for the new
      compose API things.</p>
    <p>GL<br>
    </p>
  </body>
</html>