Getting DKIM status from a Kontact plugin

I’ve been working on a Kontact plugin to provide One-Click Unsubscribe, as defined in RFC 8058, for KMail. In the RFC is this segment:

The List-Unsubscribe and List-Unsubscribe-Post headers MUST be covered by the signature and included in the “h=” tag of a valid DKIM-Signature header field.

If the message does not have the required DKIM signature, the mail receiver SHOULD NOT offer a one-click unsubscribe for that message.

I’ve found MessageViewer::DKIMManager in Messagelib which seems like it does exactly what I want, but is it safe to use from a plugin?

Assuming this is the right way to go: If I pass a KMime::Message::Ptr to DKIMManager::checkDKim, is there a way to make sure the result I get from the result signal is actually for my request? I’m not clear on when MessageViewer will call ViewerPluginInterface::setMessage over ViewerPluginInterface::setMessageItem, so maybe I don’t even need to worry about the former case.