I'm working on updating our Zimlets for compatibility with ZCS 6 and have hit a bit of a snag. We have a ZImlet that adds a button next to the "Add Attachment" button in the compose toolbar. It's working fine in ZCS 5.0.x. However, on ZCS 6 the button does not show up, and I haven't yet been able to figure out how to get it to show up. Does anyone have any info or links to info about how to make this work with v6? Here's what we're doing for v5:

var composeCtrlr = appCtxt.getApp(ZmApp.MAIL).getComposeController();
composeCtrlr.initComposeView(true); // call lazy init method for compose view
var toolbar = composeCtrlr._toolbar;
this._composeView = composeCtrlr._composeView;

// add the button to the compose toolbar
ZmMsg.myButton = "My Button";
ZmMsg.myButtonTooltip = "Button description";
ZmOperation.registerOp("MY_BUTTON", {textKey:"myButton", tooltipKey:"myButtonTooltip", image:"Attachment"});
ZmOperation.defineOperation("MY_BUTTON", {});
toolbar.addOp("MY_BUTTON", 5);
toolbar.addSelectionListener("MY_BUTTON", new AjxListener(this, this._myButtonListener));

I've been trying to dig into the code to figure out what's going on but have been unable to reliably use Firebug to debug through the code in dev=1 mode. I did see that the mail app can have multiple sessions with their own compose controllers now. I'm guessing I need to figure out and use the right session id to get the right compose controller to modify or something?

Any help would be greatly appreciated, thanks.