Using linkTo in projection - no metadata is present

Hello,

I’m using one of projections to aggregate different users vents in one stream for whole company.

It works fine with emit, but I would like to change to linkTo, because planning to set $maxAge on original streams, and want those events to be scavenged at some point of time.

function linkToCompanyStream(companyId, evt) {
if (companyId)
linkTo(‘Test-’ + companyId, evt, { companyId: companyId });
}

According to documentation, linkTo has third parameter for metadata, but if using in function like above, it doesn’t add metadata to the event. But it worked fine with emit.

Am I missing something? Why the metadata doesn’t appear to be placed with linked event?