import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
export function getLinkMetadataFromTransaction(tr) {
  return tr.steps.reduce((metadata, step) => {
    if (!(step instanceof LinkMetaStep)) {
      return metadata;
    }
    return {
      ...metadata,
      ...step.getMetadata()
    };
  }, {});
}