Thunderbird Conversations is now almost done. Quick (inline) reply was the last big feature, and it's now working fine. There are still a few things to iron out, but an official release should be out soon (meanwhile, you can find nightly builds for Thunderbird 3.3a1 here).

Quick reply

I did my best to make sure Thunderbird Conversations has a modular design. However, one problem I faced is that most Thunderbird extensions have been designed with the standard reader in mind, not the conversation view. For instance, Enigmail is able to figure out when a message is displayed, and decrypt it if needed. But Enigmail is not aware that messages can be displayed in the conversation view as well. This means that third-party extensions need to specifically add compatibility code for the conversation view. Such extensions include Enigmail, Lightning, the Bugzilla addon, and pretty much everything that interacts with the standard message reader in some way or another.

Quick reply (2)

This is where the plugin architecture comes into play. Third-party code can listen for specific conversation events (e.g. "hey, we just displayed a message, is there anything you want to do with it ?") through a hook mechanism that's part of Thunderbird Conversations. Third-party code means either:

  • another extension that's compatible (one could imagine the bugzilla addon listening to the conversation view events and doing the right thing for each message)
  • a compatibility layer that plugs a given extension into the conversation view (this is the enigmail plugin I wrote)
  • something totally unrelated that just works with the conversation view (one could imagine a plugin for printing the conversation view, for detecting embedded youtube videos and displaying them alongside the attachments...).

As an example, Thunderbird Conversations ships with an Enigmail plugin, that decrypts emails in the conversation view, gives visual feedback inside the conversation view, and acts as a bridge between Enigmail and Thunderbird Conversations. Ideally, all extensions would have special cases for the conversation view. But this is not the case right now, and the best I can do is add a few default plugins that bridge 3rd-party extensions and the conversation view together.

Enigmail

For the technically inclined, all you need to do is something along these lines:

let hasConversations;
try {
Components.utils.import("resource://conversations/hook.js");
hasConversations = true;
} catch (e) {
hasConversations = false;
}

if (hasConversations)
registerHook({
onMessageStreamed: function (aMsgHdr, aDomNode) '
// do stuff here
},
});

We're only sending one type of notification right now, but I plan on adding more:

  • onStubLoaded, when the HTML skeleton for the conversation has been loaded (so that you can add your own buttons in the UI)
  • onNewConversation, when the conversation is replaced by a brand new one
  • more...

Is there anything you would like to see for these conversation listeners? The sample enigmail plugin is located here, and it only needs one notification, but I'd glady extend the API should anyone have requests.