Event receipts for paid events contains extraneous information
After debugging I found that the code which generated the message values for contribution was also getting executed for Events. We just added a condition to check if its Contribution in CRM/Contribute/BAO/Contribution.php.

if ($this-&gt;_component == 'contribute') {
      $groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', NULL, $this-&gt;id);

  $customGroup = array();
  foreach ($groupTree as $key =&gt; $group) {
    if ($key === 'info') {
      continue;
    }

    foreach ($group['fields'] as $k =&gt; $customField) {
      $groupLabel = $group['title'];
      if (!empty($customField['customValue'])) {
        foreach ($customField['customValue'] as $customFieldValues) {
          $customGroup[$groupLabel][$customField['label']] = CRM_Utils_Array::value('data', $customFieldValues);
        }
      }
    }
  }
  $values['customGroup'] = $customGroup;
}


Do we need to clean up this code? or anyone have any thoughts so we can add issues on Lab and raise PR for same