This function is called by the Interop Broker whenever an Intent handler would fire. For FDC3 2.0 you would need to override this function and add the contextMetadata as part of the Context object inside the Intent object. Then would you need to call super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
Example
fin.Platform.init({
interopOverride: async (InteropBroker) => {
class Override extends InteropBroker {
async invokeIntentHandler(options, clientIdentity) {
const { context } = intent;
return super.invokeIntentHandler(clientIdentity, handlerId, {
...intent,
context: {
...context,
contextMetadata: {
source: {
appId: 'openfin-app',
instanceId: '3D54D456D9HT0'
}
}
}
});
}
}
return new Override();
}
});