Currently I think the only thing that uses the "capabilities" notes
field is the new tls plugin. My suggestion is to make this not a notes
field any more, but an integral part of the $transaction object.
The reason being that currently we have a horrible hoop jump with it
being in notes. Things like this:
my @capabilities = $self->transaction->notes('capabilities')
? @{ $self->transaction->notes('capabilities') }
: ();
And this:
my $cap = $transaction->notes('capabilities');
$cap ||= [];
push @$cap, 'STARTTLS';
$transaction->notes('capabilities', $cap);
Which would be much easier if we could just say:
$transaction->add_capability('STARTTLS');
And:
my @capabilities = $transaction->capabilities();
Any objections?